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