The dsp:a
tag resembles the HTML anchor tag in that it defines a link with a target destination. dsp:a
can also update a servlet bean property value and pass a page parameter from the current page to the link’s destination page.
Note:dsp:a
uses the iclass
attribute in place of the cascading stylesheet class attribute to avoid using a Java reserved word in Java code.
Attributes
TargetFileLocatedBytheLink:hreforpage(Required)
You must use one of these attributes to set the link destination.
Attribute | Description |
---|---|
| Path and file name. Resolves relative paths using the current page as a starting point. Resolves absolute paths using the Web server doc root as a starting point. |
| Path and file name. Resolves relative paths using the current page as a starting point. Resolves absolute paths using the Web application root as a starting point by prepending the request object’s |
UpdatedPropertyValue:beanandvalue,beanvalue,orparamvalue
When a user clicks a link, the ATG platform can update a property value. To do this, you must specify the property you want to set and what you want it to be set to. Determine the property you want set by designating the Nucleus path, component name, and property name in the bean
attribute. Set the new property value to the attribute that represents where that value is coming from. See options below:
Attribute | Description | Example |
---|---|---|
| Property value that is copied to the property identified in the |
|
| Dynamic value in a page parameter that is copied to the property identified in the |
|
| Value that is copied to the bean property identified in the |
|
Session confirmation
In order to prevent cross-site attacks, you can set the requiresSessionConfirmation
attribute to true. If set to true, activation of this dsp:a tag supplies the request parameter _dynSessConf
, which contains a randomly generated session long number that is associated with the current session. On receiving this request, the request-handling pipeline validates _dynSessConf
against the current session’s confirmation number. If it detects a mismatch or missing number, it blocks further request processing.
TagConverters
The tag converter tools let you convert a value into the format of your choice:
number
currency
(includingcurrencyConversion
,euro
,reverse
, andsymbol
)date
maxdate
andmindate
nullable
creditCard
(includinggroupingsize
,maskcharacter
, andnumcharsunmasked
)valueishtml
You use a tag converter when, in the context of your link, you want to convert a bean property or parameter value that is passed on to the link destination page.
For more information, see Tag Converters.
Example
<dsp:a href="index.jsp" bean="/samples/Student_01.name"
paramvalue="userName">Click here to set the name</dsp:a>
In this example, the text Click here to set the name
is a link. When clicked, the ATG platform sets the name
property of the Student_01
component to the value held by the userName
page parameter and opens index.jsp
.