Class ElementBase

    • Constructor Detail

      • ElementBase

        protected ElementBase()
        Default constructor.
      • ElementBase

        public ElementBase​(javax.servlet.http.HttpServletRequest request,
                           javax.jcr.Node node)
        Constructor for an element.
        Parameters:
        request - The hhttp servlet request
        node - The injected node
    • Method Detail

      • render

        public void render​(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse res,
                           Presentation presentation,
                           boolean ignoreServerSideIncludeLocation)
                    throws IOException,
                           javax.servlet.ServletException
        Description copied from interface: Presentable
        Render the object taking into account if it is a serverside include or not.
        Specified by:
        render in interface Presentable
        Overrides:
        render in class nl.gx.webmanager.cms.element.implementation.JcrElementBase
        Throws:
        IOException
        javax.servlet.ServletException
      • render

        public void render​(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse res,
                           Presentation presentation,
                           boolean ignoreServerSideIncludeLocation,
                           Presentable baseObject)
                    throws IOException,
                           javax.servlet.ServletException
        Description copied from interface: Presentable
        Render the object taking into account if it is a serverside include or not and add the baseObject to the presentationContext.
        Specified by:
        render in interface Presentable
        Overrides:
        render in class nl.gx.webmanager.cms.element.implementation.JcrElementBase
        Throws:
        IOException
        javax.servlet.ServletException
      • getJspPageContext

        public javax.servlet.jsp.PageContext getJspPageContext​(javax.servlet.http.HttpServletRequest request)
        Get the JSP PageContext which is active for the current HTTP request.
        Parameters:
        request -
        Returns:
        The JSP PageContext or null if none is available.
      • showForm

        public org.springframework.web.servlet.ModelAndView showForm​(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     org.springframework.validation.BindException errors,
                                                                     Map controlModel)
                                                              throws Exception
        Description copied from class: FormBindableBase
        Callback for returning the model and view for a GET request.
        Specified by:
        showForm in interface DelegatedController
        Overrides:
        showForm in class FormBindableBase
        Parameters:
        request - current servlet request
        response - current servlet response
        errors - errors holder without errors (subclass can add errors if it wants to)
        controlModel - Current model of the controller
        Returns:
        The model and view to be rendered by this controller
        Throws:
        Exception - in case of errors
      • setEditViews

        public void setEditViews​(WmEditView[] editViewSet)
        Description copied from class: FormBindableBase
        set all editViews for this component.
        Overrides:
        setEditViews in class FormBindableBase
        Parameters:
        editViewSet - EditView[] holding the editViews for this component
      • getTypeIdentifier

        public String getTypeIdentifier()
        Description copied from interface: Element
        Returns the identifier for the element type (eg. ImageElement). This type is configured in the activator.
        Returns:
        identifier of the element type
      • setComponent

        public void setComponent​(Component component)
        Description copied from class: nl.gx.webmanager.cms.core.implementation.CmsItemBase
        set the componentBase. Will be injected by the framework. componentBase is used internal for read acces to the component environment
        Overrides:
        setComponent in class nl.gx.webmanager.cms.core.implementation.CmsItemBase
      • getIcon

        public String getIcon()
        Description copied from interface: Element
        Returns the name of the icon on disk.
        Specified by:
        getIcon in interface Element
        Overrides:
        getIcon in class nl.gx.webmanager.cms.element.implementation.JcrElementBase
        Returns:
        the name of the icon on disk
      • getEditElementHeader

        public String getEditElementHeader()
        By default return the menu item text as edit element header. If it was not defined in the element component definition, the name defined in the element component definition is used instead.
        Specified by:
        getEditElementHeader in interface Element
        Overrides:
        getEditElementHeader in class nl.gx.webmanager.cms.element.implementation.JcrElementBase
        Returns:
        Header text to be displayed in the header of the element in the edit environment of WebManager
      • setDefaultPresentation

        public void setDefaultPresentation()
        Description copied from interface: Element
        Sets a default presentation for the element.
      • getTitle

        public String getTitle()
        By default return the menu item text as title. If it was not defined in the element component definition, the name defined in the element component definition is used instead.
        Specified by:
        getTitle in interface Element
        Overrides:
        getTitle in class nl.gx.webmanager.cms.element.implementation.JcrElementBase
        Returns:
        Title text to be displayed in the title of the element in the edit environment of WebManager