Class ReferenceTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.ReferenceTag
-
- All Implemented Interfaces:
ConditionalTag
,org.apache.commons.jelly.Tag
public class ReferenceTag extends FormBaseTag
A tag handler class that can be used to define references to other components or groups in the body of a
ComponentHandlerTag
.A
ComponentHandlerTag
can define a composite component handler, which itself contains other component handlers. This tag provides a means to specify the component handlers that should be added to the composite handler. This can be done by either of the following possibilities:- With the
component
attribute the name of another component can be defined that is constructed during the builder process. The associatedComponentHandler
of this component will be fetched and added to the composite handler. - The
group
attribute allows to specify the name of a component group. If this attribute is defined, the specified group is retrieved and the component handlers of all containing components are added to the composite handler.
The references will be resolved and added to the composite handler in order of appearance. It does not matter if the components refered to have not yet been created; the resolving takes place at the very end of the building process.
- Version:
- $Id: ReferenceTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
- See Also:
ComponentGroup
,ComponentGroupTag
,ComponentHandlerTag
-
-
Constructor Summary
Constructors Constructor Description ReferenceTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComponent()
Returns the name of the referenced component.String
getGroup()
Returns the name of the referenced group.protected void
process()
Executes this tag.void
setComponent(String component)
Setter method of the component attribute.void
setGroup(String group)
Setter method of the group attribute.-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
canProcess, canProcess, convertToClass, convertToNumberWithUnit, convertToNumberWithUnit, doTag, findContainer, getBuilderData, getBuilderData, getIfName, getResourceText, getResourceText, getUnlessName, processBeforeBody, setIfName, setUnlessName
-
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
-
-
-
-
Method Detail
-
getComponent
public String getComponent()
Returns the name of the referenced component.- Returns:
- the component reference
-
setComponent
public void setComponent(String component)
Setter method of the component attribute.- Parameters:
component
- the attribute value
-
getGroup
public String getGroup()
Returns the name of the referenced group.- Returns:
- the group reference
-
setGroup
public void setGroup(String group)
Setter method of the group attribute.- Parameters:
group
- the attribute value
-
process
protected void process() throws org.apache.commons.jelly.JellyTagException
Executes this tag. Finds the enclosingComponentHandlerTag
and passes the reference to it.- Specified by:
process
in classFormBaseTag
- Throws:
org.apache.commons.jelly.JellyTagException
- if a Jelly related error occurs
-
-