org.apache.commons.jelly.tags.core
Class SetPropertiesTag
java.lang.Object
org.apache.commons.jelly.TagSupport
org.apache.commons.jelly.DynaTagSupport
org.apache.commons.jelly.MapTagSupport
org.apache.commons.jelly.tags.core.SetPropertiesTag
- All Implemented Interfaces:
- DynaTag, Tag
public class SetPropertiesTag
- extends MapTagSupport
A tag which sets the bean properties on the given bean.
So if you used it as follows, for example using the <j:new> tag.
<j:new className="com.acme.Person" var="person"/>
<j:setProperties object="${person}" name="James" location="${loc}"/>
Then it would set the name and location properties on the bean denoted by
the expression ${person}.
This tag can also be nested inside a bean tag such as the <useBean> tag
or a JellySwing tag to set one or more properties, maybe inside some conditional
logic.
- Version:
- $Revision: 1807798 $
- Author:
- James Strachan
Method Summary |
void |
doTag(XMLOutput output)
Evaluates this tag after all the tags properties have been initialized. |
protected void |
setBeanProperties(java.lang.Object bean,
java.util.Map attributes)
Sets the properties on the bean. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SetPropertiesTag
public SetPropertiesTag()
doTag
public void doTag(XMLOutput output)
throws MissingAttributeException,
JellyTagException
- Description copied from interface:
Tag
- Evaluates this tag after all the tags properties have been initialized.
- Throws:
MissingAttributeException
JellyTagException
setBeanProperties
protected void setBeanProperties(java.lang.Object bean,
java.util.Map attributes)
throws JellyTagException
- Sets the properties on the bean. Derived tags could implement some custom
type conversion etc.
- Throws:
JellyTagException