Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

a

...

Attribute

...

Type

...

Required

...

Default

Description

...

id

...

string

...

TRUE

...

 

...

The id to assign the component

...

href

...

string

...

TRUE

...

 

...

The URL to call to obtain the content

...

preInvokeJS

...

string

...

FALSE

...

 

...

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.

...

afterLoading

...

string

...

FALSE

...

 

...

Javascript code that will be executed after the remote call has been made

...

notifyTopics

...

string

...

FALSE

...

 

...

Topic names to post an event to after the remote call has been made

...

errorText

...

string

...

FALSE

...

 

...

The text to display to the user if the is an error fetching the content

...

showErrorTransportText

...

string

...

FALSE

...

 

...

true/false - when to show the error message as content when the URL had problems

...

name

...

string

...

TRUE

...

 

...

 

...

value

...

string

...

FALSE

...

 

...

 

...

required

...

boolean

...

FALSE

...

 

...

 

...

disabled

...

boolean

...

FALSE

...

 

...

 

...

theme

...

string

...

FALSE

...

 

...

 

...

template

...

string

...

FALSE

...

 

...

 

...

cssClass

...

string

...

FALSE

...

 

...

 

...

cssStyle

...

string

...

FALSE

...

 

...

 

...

label

...

string

...

FALSE

...

 

...

 

...

labelposition

...

string

...

FALSE

...

 

...

 

...

tabindex

...

string

...

FALSE

...

 

...

 

...

onclick

...

string

...

FALSE

...

 

...

 

...

ondblclick

...

string

...

FALSE

...

 

...

 

...

onmousedown

...

string

...

FALSE

...

 

...

 

...

onmouseup

...

string

...

FALSE

...

 

...

 

...

onmouseover

...

string

...

FALSE

...

 

...

 

...

onmousemove

...

string

...

FALSE

...

 

...

 

...

onmouseout

...

string

...

FALSE

...

 

...

 

...

onfocus

...

string

...

FALSE

...

 

...

 

...

onblur

...

string

...

FALSE

...

 

...

 

...

onkeypress

...

string

...

FALSE

...

 

...

 

...

onkeydown

...

string

...

FALSE

...

 

...

 

...

onselect

...

string

...

FALSE

...

 

...

 

...

onchange

...

string

...

FALSE

...

 

...

 

Nested Elements

The remote A tag supports nested param elements. <ww:param name="" value=""/>

Handling Results

  • Currently the remote a will try to evaluate the results as JavaScript. So the action defined in href should return a javascript snippet that will be executed upon return. Th
  • The afterLoading method is called after the the above javascript gets evaluated. The afterLoading javascript does not currrently have access to the returned data.

Example

Code Block

<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:

Code Block

 <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:

Code Block

  <ww:a id="test" theme="ajax" href="/simpeResult.action" preInvokeJS="confirm(\'You sure\')">A</ww:a>
Note

Remember that if you want your results to be executed... and your using sitemesh... you must NOT decorate the request w/ sitemesh.

...

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

...

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}"

...