Class ComponentGroupTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- net.sf.jguiraffe.gui.builder.components.tags.FormBaseTag
-
- net.sf.jguiraffe.gui.builder.components.tags.ComponentGroupTag
-
- All Implemented Interfaces:
ConditionalTag
,org.apache.commons.jelly.Tag
public class ComponentGroupTag extends FormBaseTag
A tag for constructing (logic) groups of components.
With this tag a
ComponentGroup
object can be constructed. The group will be created and stored in the current Jelly context. It will be filled during the builder process. It can later be referenced to access all component that belong to this group.Groups can be filled with components in two different ways:
- Each tag derived from
InputComponentTag
supports thegroups
attribute that can obtain a comma separated list of the names of the group the component should be added to. The tag will then find the specified group objects and add the new component's name to all of them other. - It is also possible to nest tags defining input components inside a
ComponentGroupTag
. They are then automatically added to the outer group (but only if thegroups
attribute is undefined).
Tags of this type support only one required attribute
name
, which defines the group's name. Names for groups must be unique.- Version:
- $Id: ComponentGroupTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description ComponentGroupTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentGroup
getGroup()
Returns the group that was created by this tag.String
getName()
Returns the group's name.protected void
process()
Executes this tag after its body was processed.protected void
processBeforeBody()
Executes this tag before its body is processed.void
setName(String name)
Setter method of the name 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, 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
-
getName
public String getName()
Returns the group's name.- Returns:
- the name of the group
-
setName
public void setName(String name)
Setter method of the name attribute.- Parameters:
name
- the attribute value
-
getGroup
public ComponentGroup getGroup()
Returns the group that was created by this tag.- Returns:
- the group
-
processBeforeBody
protected void processBeforeBody() throws org.apache.commons.jelly.JellyTagException, FormBuilderException
Executes this tag before its body is processed. The corresponding group object will be created immediately.- Overrides:
processBeforeBody
in classFormBaseTag
- Throws:
FormBuilderException
- if there is another group with the specified nameorg.apache.commons.jelly.JellyTagException
- if a jelly related error occurs
-
process
protected void process()
Executes this tag after its body was processed. This is a dummy implementation. All actions have been performed before body processing.- Specified by:
process
in classFormBaseTag
-
-