Class 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 associated ComponentHandler 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 Detail

      • ReferenceTag

        public ReferenceTag()
    • 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 enclosing ComponentHandlerTag and passes the reference to it.
        Specified by:
        process in class FormBaseTag
        Throws:
        org.apache.commons.jelly.JellyTagException - if a Jelly related error occurs