Class AbstractMenuItemTag

  • All Implemented Interfaces:
    javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
    Direct Known Subclasses:
    SubMenuItemTag, TopMenuItemTag

    public abstract class AbstractMenuItemTag
    extends javax.servlet.jsp.tagext.SimpleTagSupport
    Abstract class for menu items in hAC.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String id  
      protected java.lang.String label  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void doTag()  
      protected abstract java.lang.String getATagAttrs()
      Gets the additional attributes of a tag for item element like id and class.
      protected java.lang.String getDataMenuitemFromLabel()
      Generates value for data-menuitem attribute from label.
      protected abstract java.lang.String getHref()
      Gets the value of href attribute in a tag for item element.
      protected java.lang.String getHtml()  
      protected java.lang.String getIdFromLabel()
      Generates html id from provided label.
      void setId​(java.lang.String id)  
      void setLabel​(java.lang.String label)  
      • Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport

        findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
      • Methods inherited from class java.lang.Object

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

      • id

        protected java.lang.String id
      • label

        protected java.lang.String label
    • Constructor Detail

      • AbstractMenuItemTag

        public AbstractMenuItemTag()
    • Method Detail

      • setId

        public void setId​(java.lang.String id)
      • setLabel

        public void setLabel​(java.lang.String label)
      • doTag

        public void doTag()
                   throws javax.servlet.jsp.JspException,
                          java.io.IOException
        Specified by:
        doTag in interface javax.servlet.jsp.tagext.SimpleTag
        Overrides:
        doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
        Throws:
        javax.servlet.jsp.JspException
        java.io.IOException
      • getHref

        protected abstract java.lang.String getHref()
                                             throws javax.servlet.jsp.JspException
        Gets the value of href attribute in a tag for item element.
        Returns:
        the href value
        Throws:
        javax.servlet.jsp.JspException - the jsp exception
      • getATagAttrs

        protected abstract java.lang.String getATagAttrs()
                                                  throws javax.servlet.jsp.JspException
        Gets the additional attributes of a tag for item element like id and class.
        Returns:
        the a tag attrs
        Throws:
        javax.servlet.jsp.JspException - the jsp exception
      • getHtml

        protected java.lang.String getHtml()
                                    throws javax.servlet.jsp.JspException
        Throws:
        javax.servlet.jsp.JspException
      • getIdFromLabel

        protected java.lang.String getIdFromLabel()
        Generates html id from provided label.
        Returns:
        the id from label
      • getDataMenuitemFromLabel

        protected java.lang.String getDataMenuitemFromLabel()
        Generates value for data-menuitem attribute from label.
        Returns:
        the data menuitem from label