blob: 663d6664927a191017afd09a79ea0d6660d5184b [file] [log] [blame]
<html>
<head>
<title>&lt;a2:a /&gt;</title>
</head>
<body>
<h1>Tag Name: &lt;a2:a /&gt;</h1>
<h2>Description</h2>
<p>
Render a HTML href element that when clicked calls a URL via remote XMLHttpRequest
</p>
<p>
<!-- START SNIPPET: javadoc --> A tag that creates a HTML &lt;a href='' /&gt; 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. <!-- END SNIPPET: javadoc --> <p/> <b>Examples</b> <pre> <!-- START SNIPPET: example1 --> &lt;a:a id="link1" theme="ajax" href="/DoIt.action" errorText="An error ocurred" showErrorTransportText="true"&gt; &lt;img border="none" src="&lt;%=request.getContextPath()%&gt;/images/delete.gif"/&gt; &lt;a:param name="id" value="1"/&gt; &lt;/a:a&gt; <!-- END SNIPPET: example1 --> </pre> </p> <!-- START SNIPPET: exampledescription1 --> Results in <!-- END SNIPPET: exampledescription1 --> </p> <pre> <!-- START SNIPPET: example2 --> &lt;a dojoType="BindAnchor" evalResult="true" id="link1" href="/DoIt.action?id=1" errorHtml="An error ocurred" showTransportError="true"&gt;&lt;/a&gt; <!-- END SNIPPET: example2 --> </pre> </p> <!-- START SNIPPET: exampledescription2 --> Here is an example that uses the postInvokeJS. This example is in altSyntax=true: <!-- END SNIPPET: exampledescription2 --> </p> <pre> <!-- START SNIPPET: example3 --> &lt;a:a id="test" theme="ajax" href="/simpeResult.action" preInvokeJS="confirm(\'You sure\')"&gt; A &lt;/a:a&gt; <!-- END SNIPPET: example3 --> </pre>
</p>
<h2>Attributes</h2>
<p>
<!-- START SNIPPET: tagattributes -->
<table width="100%">
<tr>
<th align="left" valign="top"><h4>Name</h4></th>
<th align="left" valign="top"><h4>Required</h4></th>
<th align="left" valign="top"><h4>Default</h4></th>
<th align="left" valign="top"><h4>Type</h4></th>
<th align="left" valign="top"><h4>Description</h4></th>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">id</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">The id to assign the component</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">notifyTopics</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Topic names to post an event to after the remote call has been made</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">preInvokeJS</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">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.</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">theme</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">The theme to use for the element. <b>This tag will usually use the ajax theme.</b></td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">href</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">The URL to call to obtain the content</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">errorText</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">The text to display to the user if the is an error fetching the content</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">showErrorTransportText</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">false</td>
<!-- Type -->
<td align="left" valign="top">Boolean</td>
<!-- Description -->
<td align="left" valign="top">when to show the error message as content when the URL had problems</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">afterLoading</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">Javascript code that will be executed after the content has been fetched</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">openTemplate</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set template to use for opening the rendered html.</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">templateDir</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">The template directory.</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">template</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">The template (other than default) to use for rendering the element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">cssClass</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">The css class to use for element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">cssStyle</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">The css style definitions for element ro use</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">title</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html title attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">disabled</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">label</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Label expression used for rendering a element specific label</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">labelposition</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">define label position of form element (top/left)</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">requiredposition</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">define required position of required form element (left|right)</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">name</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">The name to set for element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">required</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">false</td>
<!-- Type -->
<td align="left" valign="top">Boolean</td>
<!-- Description -->
<td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">tabindex</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html tabindex attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">value</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Preset the value of input element.</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onclick</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onclick attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">ondblclick</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html ondblclick attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onmousedown</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onmousedown attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onmouseup</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onmouseup attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onmouseover</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onmouseover attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onmousemove</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onmousemove attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onmouseout</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onmouseout attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onfocus</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onfocus attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onblur</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onblur attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onkeypress</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onkeypress attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onkeydown</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onkeydown attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onkeyup</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onkeyup attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onselect</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">onchange</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html onchange attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">accesskey</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top">&nbsp;</td>
<!-- Type -->
<td align="left" valign="top">Object/String</td>
<!-- Description -->
<td align="left" valign="top">Set the html accesskey attribute on rendered html element</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">tooltip</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top"></td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">Set the tooltip of this particular component</td>
</tr>
<tr>
<!-- Attribute name -->
<td align="left" valign="top">tooltipConfig</td>
<!-- Required -->
<td align="left" valign="top">false</td>
<!-- Default -->
<td align="left" valign="top"></td>
<!-- Type -->
<td align="left" valign="top">String</td>
<!-- Description -->
<td align="left" valign="top">Set the tooltip configuration</td>
</tr>
</table>
<!-- END SNIPPET: tagattributes -->
</p>
<p>
<center><a href="index.html">Back to Taglib Index</a></center>
</p>
</body>
</html>