You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

To use this tag:

  • Add: <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> to your page.
  • The head tag must be included on the page, which can be configured for performance or debugging purposes.
  • If the parseContent parameter for the head tag is false (it is false by default), then the id tag is required.

Additional Examples

For more examples see Ajax and JavaScript Recipes

Description

Error formatting macro: snippet: java.lang.NullPointerException

There's a bug in IE6/IE7 which makes impossible to use the target's attribute with a parent Div, because such Div's content's are overwritten with the tag's loadingText. Resulting in an "undefined" message in the content's, instead of the result of the request.

One possible alternative is to set showLoadingText="false" and set the indicator attribute to an element showing the desired loading text or image (outside the div).

<img id="loadingImage" src="images/loadingAnimation.gif" style="display:none"/>
<s:div id="parentDiv">
    <s:form action="actionName">
        <s:submit id="btn" />
        <sx:bind sources="btn" events="onclick" targets="parentDiv" showLoadingText="false" indicator="loadingImage"/>
    </s:form>
</s:div>

Parameters

Error formatting macro: snippet: java.lang.NullPointerException

Examples

Without attaching to an event, listening to a topic (used to make an Ajax call):

Error formatting macro: snippet: java.lang.NullPointerException

Attached to event 'onclick' on submit button:

Error formatting macro: snippet: java.lang.NullPointerException

Submit form:

Error formatting macro: snippet: java.lang.NullPointerException

Using beforeNotifyTopics:

Error formatting macro: snippet: java.lang.NullPointerException

Using afterNotifyTopics and highlight:

Error formatting macro: snippet: java.lang.NullPointerException

Using errorNotifyTopics and indicator:

Error formatting macro: snippet: java.lang.NullPointerException
  • No labels