Class ActionDataTag

  • All Implemented Interfaces:
    ActionData, ConditionalTag, IconSupport, org.apache.commons.jelly.Tag

    public class ActionDataTag
    extends AbstractActionDataTag

    A simple tag for creating objects of type ActionData.

    This class can be used if only properties of actions are to be defined, but no complete action objects. The properties can later be used by other components (e.g. handlers for popup menus) in order to define real actions or other graphical components with similar properties.

    The major part of the functionality provided by this tag is already implemented by the super class. What this class does is to store a reference to itself (which is actually an ActionData implementation) in the Jelly context where it can be retrieved later on. For this purpose the mandatory var attribute must be specified. Of course, all other attributes defined by the super class are available, too. A usage example for this tag could look as follows:

     <a:actionData textres="ACT_FILE_OPEN_TXT"
       mnemonicres="ACT_FILE_OPEN_MNEMO" tooltipres="ACT_FILE_OPEN_TIP">
       <f:icon resource="icon.gif"/>
     </a:actionData>
     

    Version:
    $Id: ActionDataTag.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Constructor Detail

      • ActionDataTag

        public ActionDataTag()
    • Method Detail

      • getVar

        public String getVar()
        Returns the name of the variable where to store the data object created by this tag.
        Returns:
        the name of the target variable
      • setVar

        public void setVar​(String var)
        Set method of the var attribute.
        Parameters:
        var - the attribute's value
      • process

        protected void process()
                        throws org.apache.commons.jelly.JellyTagException,
                               FormBuilderException
        Executes this tag. This implementation stores an ActionData object in the current context under the name specified by the var attribute. If the attribute is missing, an exception is thrown.
        Specified by:
        process in class FormBaseTag
        Throws:
        org.apache.commons.jelly.JellyTagException - if the tag is used incorrectly
        FormBuilderException - if an error occurs
      • getTask

        public Object getTask()
        Returns the task for the represented action. Tasks are not supported by this tag, so this method always returns null.
        Returns:
        the task of this action
      • getActionBuilder

        protected ActionBuilder getActionBuilder()
        Returns a reference to the current ActionBuilder instance. This instance is expected to be placed in the Jelly context.
        Returns:
        the current action builder
      • getActionManager

        protected ActionManager getActionManager()
        Convenience method for obtaining a reference to the current ActionManager.
        Returns:
        the current action manager