Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

set

Description

The set tag updates the specified property.

Tag Body

JSP

Restrictions

If the name attribute is not specified then uses a parent bean tag to locate the bean on which to operate. The property specifies what to update. The value attribute specifies the string value to update the property; the id attribute specifies the bean object value to update the property. Either value or id must be specified.

Attributes

The tag has the following attributes for which the Required values are “Yes” and “No”:

name

Name of the bean to use.

property

Name of the property to update.

value

String value of the property to update.

id

Bean object value of the property to update.

edit

Specifies the edit bean that will be applied to value prior to storage.

Properties

None.

Example(s)
<%-- set the date time property on parent bean --%>
<util:bean type="java.util.Date">
<util:set property="time" value="0"/>
</util:bean>

<%-- set the date time property on named bean --%>
<util:bean id="date" type="java.util.Date"/>
...
<util:set name="date" property="time" value="0"/>

<%-- set a bean onto another bean property --%>
<util:bean id="one" type="BeanOne"/>
<util:bean id="two" type="Beantwo"/>
<util:set name="two" id="one" property="one"/>