| java.lang.Object com.opensymphony.webwork.components.Component com.opensymphony.webwork.components.UIBean com.opensymphony.webwork.components.ClosingUIBean com.opensymphony.webwork.components.RemoteCallUIBean com.opensymphony.webwork.components.Anchor
Anchor | public class Anchor extends RemoteCallUIBean (Code) | |
A tag that creates a HTML <a href='' /> that when clicked calls a URL remote XMLHttpRequest call via the dojo
framework. The result from the URL is executed as JavaScript. If a "listenTopics" is supplied, it will publish a
'click' message to that topic when the result is returned.
Examples
<ww:a id="link1" theme="ajax" href="/DoIt.action" errorText="An error ocurred" showErrorTransportText="true">
<img border="none" src="<%=request.getContextPath()%>/images/delete.gif"/>
<ww:param name="id" value="1"/>
</ww:a>
Results in
<a dojoType="BindAnchor" evalResult="true" id="link1" href="/DoIt.action?id=1" errorHtml="An error ocurred"
showTransportError="true"></a>
Here is an example that uses the postInvokeJS. This example is in altSyntax=true:
<ww:a id="test" theme="ajax" href="/simpeResult.action" preInvokeJS="confirm(\'You sure\')">
A
</ww:a>
author: Ian Roughley author: Rene Gielen version: $Revision: 2468 $ since: 2.2 |
COMPONENT_NAME | final public static String COMPONENT_NAME(Code) | | |
evaluateExtraParams | public void evaluateExtraParams()(Code) | | |
getDefaultOpenTemplate | public String getDefaultOpenTemplate()(Code) | | |
getDefaultTemplate | protected String getDefaultTemplate()(Code) | | |
setId | public void setId(String id)(Code) | | The id to assign the component
|
setNotifyTopics | public void setNotifyTopics(String notifyTopics)(Code) | | Topic names to post an event to after the remote call has been made
|
setPreInvokeJS | public void setPreInvokeJS(String preInvokeJS)(Code) | | A javascript snippet that will be invoked prior to the execution of the target href. If provided must return true or false. True indicates to continue executing target, false says do not execute link target. Possible uses are for confirm dialogs.
|
Methods inherited from com.opensymphony.webwork.components.Component | public void addAllParameters(Map params)(Code)(Java Doc) public void addParameter(String key, Object value)(Code)(Java Doc) public boolean altSyntax()(Code)(Java Doc) public void copyParams(Map params)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean escapeXml)(Code)(Java Doc) protected String determineNamespace(String namespace, OgnlValueStack stack, HttpServletRequest req)(Code)(Java Doc) public boolean end(Writer writer, String body)(Code)(Java Doc) protected boolean end(Writer writer, String body, boolean popComponentStack)(Code)(Java Doc) protected WebWorkException fieldError(String field, String errorMsg, Exception e)(Code)(Java Doc) protected Component findAncestor(Class clazz)(Code)(Java Doc) protected String findString(String expr)(Code)(Java Doc) protected String findString(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr)(Code)(Java Doc) protected Object findValue(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr, Class toType)(Code)(Java Doc) public Stack getComponentStack()(Code)(Java Doc) public String getId()(Code)(Java Doc) public Map getParameters()(Code)(Java Doc) public OgnlValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public boolean start(Writer writer)(Code)(Java Doc) protected String toString(Throwable t)(Code)(Java Doc) public boolean usesBody()(Code)(Java Doc)
|
|
|