Class HtmlMenuWrapper

  • Direct Known Subclasses:
    HtmlMenuWrapperImage

    public class HtmlMenuWrapper
    extends java.lang.Object
    Widget Library - HTML Menu Wrapper class - makes it easy to do the setup and render of a menu
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected HtmlMenuWrapper()  
        HtmlMenuWrapper​(java.lang.String resourceName, java.lang.String menuName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getFromContext​(java.lang.String name)  
      java.lang.Object getFromContext​(java.lang.String menuItemName, java.lang.String valueName)  
      boolean getIsError()  
      MenuStringRenderer getMenuRenderer()  
      static HtmlMenuWrapper getMenuWrapper​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session, java.lang.String menuDefFile, java.lang.String menuName, java.lang.String menuWrapperClassName)  
      ModelMenu getModelMenu()  
      MenuStringRenderer getRenderer()  
      javax.servlet.http.HttpServletRequest getRequest()  
      javax.servlet.http.HttpServletResponse getResponse()  
      void init​(java.lang.String resourceName, java.lang.String menuName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      void putInContext​(java.lang.String name, java.lang.Object value)  
      void putInContext​(java.lang.String menuItemName, java.lang.String valueName, java.lang.Object value)  
      java.lang.String renderMenuString()  
      void setIsError​(boolean isError)
      Tells the menu library whether this is a response to an error or not.
      void setMenuOverrideName​(java.lang.String menuName)  
      void setParameters​(java.util.Map<java.lang.String,​java.lang.Object> paramMap)  
      void setRenderer​(MenuStringRenderer renderer)  
      void setRequest​(javax.servlet.http.HttpServletRequest request)  
      void setResponse​(javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class java.lang.Object

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

      • module

        public static final java.lang.String module
      • resourceName

        protected java.lang.String resourceName
      • menuName

        protected java.lang.String menuName
      • request

        protected javax.servlet.http.HttpServletRequest request
      • response

        protected javax.servlet.http.HttpServletResponse response
      • context

        protected java.util.Map<java.lang.String,​java.lang.Object> context
    • Constructor Detail

      • HtmlMenuWrapper

        protected HtmlMenuWrapper()
      • HtmlMenuWrapper

        public HtmlMenuWrapper​(java.lang.String resourceName,
                               java.lang.String menuName,
                               javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               javax.xml.parsers.ParserConfigurationException
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
    • Method Detail

      • init

        public void init​(java.lang.String resourceName,
                         java.lang.String menuName,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws java.io.IOException,
                         org.xml.sax.SAXException,
                         javax.xml.parsers.ParserConfigurationException
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
      • renderMenuString

        public java.lang.String renderMenuString()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • setIsError

        public void setIsError​(boolean isError)
        Tells the menu library whether this is a response to an error or not. Defaults on initialization according to the presense of an errorMessage in the request or if an isError parameter was passed to the page with the value "true". If true then the prefilled values will come from the parameters Map instead of the value Map.
      • getIsError

        public boolean getIsError()
      • setMenuOverrideName

        public void setMenuOverrideName​(java.lang.String menuName)
      • putInContext

        public void putInContext​(java.lang.String name,
                                 java.lang.Object value)
      • putInContext

        public void putInContext​(java.lang.String menuItemName,
                                 java.lang.String valueName,
                                 java.lang.Object value)
      • getFromContext

        public java.lang.Object getFromContext​(java.lang.String name)
      • getFromContext

        public java.lang.Object getFromContext​(java.lang.String menuItemName,
                                               java.lang.String valueName)
      • getModelMenu

        public ModelMenu getModelMenu()
      • setRequest

        public void setRequest​(javax.servlet.http.HttpServletRequest request)
      • setResponse

        public void setResponse​(javax.servlet.http.HttpServletResponse response)
      • getRequest

        public javax.servlet.http.HttpServletRequest getRequest()
      • getResponse

        public javax.servlet.http.HttpServletResponse getResponse()
      • getMenuWrapper

        public static HtmlMenuWrapper getMenuWrapper​(javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response,
                                                     javax.servlet.http.HttpSession session,
                                                     java.lang.String menuDefFile,
                                                     java.lang.String menuName,
                                                     java.lang.String menuWrapperClassName)
      • setParameters

        public void setParameters​(java.util.Map<java.lang.String,​java.lang.Object> paramMap)