Class EditContextImpl

  • All Implemented Interfaces:
    EditContext

    public class EditContextImpl
    extends Object
    implements EditContext
    Implementation of the EditContext interface. Contains a stack of objects. Current active object in the active jsp is on top of the stack.
    Author:
    arjans
    • Constructor Detail

      • EditContextImpl

        public EditContextImpl​(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res)
        Constructor. Typically called by the WebManagerController.
    • Method Detail

      • getBaseObject

        public Object getBaseObject()
        Description copied from interface: EditContext
        Return object at the top of the stack.
        Specified by:
        getBaseObject in interface EditContext
        Returns:
        object at the top of the stack.
      • getBaseModel

        public Object getBaseModel()
        Description copied from interface: EditContext
        Return model at the top of the stack.
        Specified by:
        getBaseModel in interface EditContext
        Returns:
        model at the top of the stack.
      • pop

        public void pop()
        Description copied from interface: EditContext
        Pop the top object and presentation.
        Specified by:
        pop in interface EditContext
      • popModel

        public void popModel()
        Description copied from interface: EditContext
        Pop the top model.
        Specified by:
        popModel in interface EditContext
      • push

        public void push​(Object activeObject)
        Description copied from interface: EditContext
        Add an object and a presentation to the stack.
        Specified by:
        push in interface EditContext
      • getFirstObject

        public Object getFirstObject()
        Description copied from interface: EditContext
        Returns the first component in the the stack.
        Specified by:
        getFirstObject in interface EditContext
        Returns:
        the first component in the the stack.
      • getWebsite

        public Website getWebsite()
        Description copied from interface: EditContext
        Retrieve the website from the user session
        Specified by:
        getWebsite in interface EditContext
        Returns:
        The website
      • addModelAndView

        public void addModelAndView​(Object object,
                                    org.springframework.web.servlet.ModelAndView modelAndView)
        Description copied from interface: EditContext
        Adds a model and view to the edit context. The RenderTag will load the View to be rendered from the EditContext.
        Specified by:
        addModelAndView in interface EditContext
        Parameters:
        object - Object (form backing object or business object) for which the View should be set
        modelAndView - The ModelAndView to add to the EditContext
      • getModelAndView

        public org.springframework.web.servlet.ModelAndView getModelAndView​(Object object)
        Description copied from interface: EditContext
        Returns the ModelAndView for the given object. The RenderTag will load the View to be rendered from the EditContext.
        Specified by:
        getModelAndView in interface EditContext
        Parameters:
        object - Object (form backing object or business object) for which the View should be retrieved
        Returns:
        The ModelAndView for the object