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

Compare with Current View Page History

« Previous Version 41 Next »

Description

Error formatting macro: snippet: java.lang.NullPointerException

While this tag can be used with the simple theme, xhtml theme, and others, it is really designed to work best with the ajax theme. We recommend reading the ajax a template documentation for more details.

Parameters

Error formatting macro: snippet: java.lang.NullPointerException

Usage

To get started, use the head tag and the ajax theme. See ajax head template for more information. Then look at the usage details for the ajax a template.

 
If you want to use additional parameters in your S:a the Best Practice is to use a s:url to create your url and then leverage this url into your s:a tag. This is done by creating a s:url and specifying an id attribute.. like "testUrlId" in this example. Then in the s:a tag reference this id in the href attribute via " %{testUrlId}"

<s:url id="testUrlId" namespace="/subscriber" action="customField" method="delete">
                  <s:param name="customFieldDefinition.id" value="${id}"/>
              </s:url>
             <s:a errorText="Sorry your request had an error." preInvokeJS="confirm('Are you sure you want to delete this item?')" href="%{testUrlId}">
                    <img src="<s:url value="/images/delete.gif"/>" border="none"/></s:a>

<img xsrc="<s:url value="/images/delete.gif"/>" border="none"/></s:a><img xsrc="<s:url value="/images/delete.gif"/>" border="none"/></s:a>
  • No labels