Class ShortcutTagHelper

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPropertyClass​(java.lang.String className, java.lang.String styleName, java.lang.String selectedName)
      Adds a new property class to the list.
      void cleanState()
      Resets the state of the tag library, by cleaning the values of the properties initialized for this tag.
      MarkupOutput getContentHead()
      Obtains the contents to render before the tag's body.
      MarkupOutput getContentTail()
      Obtains the contents to render after the tag's body.
      java.lang.String getNormalClass()
      Gets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helper
      java.lang.String getSelectedClass()
      Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helper
      java.lang.String getSelectedShortcut()
      Gets the value assigned to the selected attribute of the custom tag instance that uses this helper
      MarkupOutput getShortcutMarkup()
      Generates the HTML content for the current shortcut element.
      java.lang.String getType()
      Gets the value assigned to the type attribute of the custom tag instance that uses this helper
      boolean getUcase()
      Gets the value assigned to the ucase attribute of the custom tag instance that uses this helper
      boolean hasMoreElements()
      Determines if there are still elements on the shortcut list to be displayed
      boolean isTagVisible()
      Indicates if the tag is visible or not.
      boolean nextElement()
      Moves the current position to the next element in the shortcut list that shall be displayed on the page.
      java.lang.String processShortcutBody​(java.lang.String bodyContent)
      Analyzes the body of this tag instance in search of any APPLYPROPERTY special attribute that was defined together with a ShortcutPropertyTag tag so each one of the elements is formatted.
      void setNormalClass​(java.lang.String value)
      Sets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helper
      void setSelectedClass​(java.lang.String value)
      Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helper
      void setSelectedShortcut​(java.lang.String value)
      Sets the value assigned to the selected attribute of the custom tag instance that uses this helper
      void setType​(java.lang.String value)
      Sets the value assigned to the type attribute of the custom tag instance that uses this helper
      void setUcase​(boolean value)
      Sets the value assigned to the ucase attribute of the custom tag instance that uses this helper
      boolean shallRepeatTag()
      Indicates if the content of the tag should be analyzed and displayed again or not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShortcutTagHelper

        public ShortcutTagHelper()
    • Method Detail

      • cleanState

        public void cleanState()
        Resets the state of the tag library, by cleaning the values of the properties initialized for this tag.
        Overrides:
        cleanState in class MstrPageTagHelper
      • hasMoreElements

        public boolean hasMoreElements()
        Determines if there are still elements on the shortcut list to be displayed
        Returns:
        true if the shortcut list contains at least one more element that shall be shown on the page.
      • nextElement

        public boolean nextElement()
        Moves the current position to the next element in the shortcut list that shall be displayed on the page.
        Returns:
        true there exists still an element to be displayed, and false if there's no more elements to render.
      • addPropertyClass

        public void addPropertyClass​(java.lang.String className,
                                     java.lang.String styleName,
                                     java.lang.String selectedName)
        Adds a new property class to the list. This mehod is called from the ShortcutPropertyTag for applying any special formatting to the elements to be displayed.
      • getShortcutMarkup

        public MarkupOutput getShortcutMarkup()
        Generates the HTML content for the current shortcut element.
        Returns:
        a MarkupOutput instance initialized with all the HTML content that shall be rendered for the current shortcut item.
      • processShortcutBody

        public java.lang.String processShortcutBody​(java.lang.String bodyContent)
        Analyzes the body of this tag instance in search of any APPLYPROPERTY special attribute that was defined together with a ShortcutPropertyTag tag so each one of the elements is formatted.
        Returns:
        a String value with the final body content of the tag, with the style definition added, as specified by the ShortcutPropertyTag and the APPLYPROPERTY value.
      • isTagVisible

        public boolean isTagVisible()
        Indicates if the tag is visible or not.
        Specified by:
        isTagVisible in class AbstractBodyTagHelper
        Returns:
        a boolean value indicating if the tag is visible or not
      • shallRepeatTag

        public boolean shallRepeatTag()
        Indicates if the content of the tag should be analyzed and displayed again or not.
        Specified by:
        shallRepeatTag in class AbstractBodyTagHelper
        Returns:
        a boolean value indicating if the tag contents should be analyzed again or not.
      • getContentHead

        public MarkupOutput getContentHead()
                                    throws java.io.IOException
        Obtains the contents to render before the tag's body.
        Specified by:
        getContentHead in class AbstractBodyTagHelper
        Returns:
        a MarkupOutput instance initialized with the contents to display
        Throws:
        java.io.IOException - if an error happens while getting the contents to render.
      • getContentTail

        public MarkupOutput getContentTail()
                                    throws java.io.IOException
        Obtains the contents to render after the tag's body.
        Specified by:
        getContentTail in class AbstractBodyTagHelper
        Returns:
        a MarkupOutput instance initialized with the contents to display
        Throws:
        java.io.IOException - if an error happens while getting the contents to render.
      • setNormalClass

        public void setNormalClass​(java.lang.String value)
        Sets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helper
        Parameters:
        value - String value of the CSS class to apply
      • getNormalClass

        public java.lang.String getNormalClass()
        Gets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helper
        Returns:
        String value of the CSS class to apply
      • setSelectedClass

        public void setSelectedClass​(java.lang.String value)
        Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helper
        Parameters:
        value - String value of the CSS class to apply for the selected shortcut.
      • setType

        public void setType​(java.lang.String value)
        Sets the value assigned to the type attribute of the custom tag instance that uses this helper
        Parameters:
        value - String value of the type of shortcut list to display
      • setUcase

        public void setUcase​(boolean value)
        Sets the value assigned to the ucase attribute of the custom tag instance that uses this helper
        Parameters:
        value - boolean value defining the upper case flag
      • getUcase

        public boolean getUcase()
        Gets the value assigned to the ucase attribute of the custom tag instance that uses this helper
        Returns:
        boolean value defining the upper case flag
      • getType

        public java.lang.String getType()
        Gets the value assigned to the type attribute of the custom tag instance that uses this helper
        Returns:
        String value of the type of shortcut list to display.
      • getSelectedClass

        public java.lang.String getSelectedClass()
        Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helper
        Returns:
        String value of the CSS class to apply to the selected shortcut.
      • getSelectedShortcut

        public java.lang.String getSelectedShortcut()
        Gets the value assigned to the selected attribute of the custom tag instance that uses this helper
        Returns:
        a String with the name of the selected shortcut
      • setSelectedShortcut

        public void setSelectedShortcut​(java.lang.String value)
        Sets the value assigned to the selected attribute of the custom tag instance that uses this helper
        Parameters:
        value - a String with the name of the selected shortcut