Class 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 the groups 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 the groups 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 Detail

      • ComponentGroupTag

        public ComponentGroupTag()
    • 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 class FormBaseTag
        Throws:
        FormBuilderException - if there is another group with the specified name
        org.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 class FormBaseTag