|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.web.servlet.mvc.BaseCommandController
org.springframework.web.servlet.mvc.AbstractFormController
org.springframework.web.servlet.mvc.SimpleFormController
nl.gx.webmanager.springmvc.controller.BaseWebmanagerController
nl.gx.webmanager.springmvc.controller.component.ComponentController
nl.gx.webmanager.springmvc.controller.component.PanelComponentController
public abstract class PanelComponentController
This class is the base class for panel component controllers. Component controllers are controllers that are registered by a component. These controllers are not running in the Spring application context but controller methods are delegated to it by a MainSpringController which does run inside the Spring application context. A panel only contains one controller controlling all tabs. Dependend on the current selected tab however different form backing objects may be returned by this controller. This controller contains base functionality to define (horizontal and vertical) panel tabs. Custom controllers for panel components should extend this class.
| Field Summary | |
|---|---|
static java.lang.String |
COMMAND_OBJECT_KEY
key to set/get the command object on the session for implementaiton of the springmvc post and redirect patern. |
static java.lang.String |
PANEL_ID_KEY
key to get the request attribute for selection of the current pannel class. |
static java.lang.String |
PANEL_TAB_ID_KEY
request key for tabid of the active tab. |
static java.lang.String |
WEB_ID_KEY
key to get the current webid from the request |
| Fields inherited from class nl.gx.webmanager.springmvc.controller.BaseWebmanagerController |
|---|
formBackingObject, PROTOCOL_PROCESSED_KEY |
| Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
|---|
DEFAULT_COMMAND_NAME |
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
METHOD_GET, METHOD_HEAD, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
PanelComponentController()
|
|
| Method Summary | |
|---|---|
PanelTab |
addTab(java.lang.String tabId,
java.lang.String titleKey,
java.lang.String viewFileName,
DelegatedController controller,
javax.servlet.http.HttpServletRequest request)
Adds a main tab to the panel navigation. |
PanelTab |
addTab(java.lang.String tabId,
java.lang.String titleKey,
java.lang.String titleImage,
java.lang.String viewFileName,
DelegatedController controller,
java.lang.String presentationName,
javax.servlet.http.HttpServletRequest request)
Adds a main tab to the panel navigation. |
protected void |
createEditViews()
Callback to add edit views. |
java.lang.Object |
formBackingObject(javax.servlet.http.HttpServletRequest request)
Retrieve a form backing object for the current form from the given request. |
WmEditView |
getEditView()
get the default editview; the edit view with empty value |
protected DelegatedController |
getStatefulTabController(java.lang.Class clazz,
javax.servlet.http.HttpServletRequest request)
This method is a helper class for caching controller instances per user session. |
protected abstract void |
initializeTabSet(javax.servlet.http.HttpServletRequest request,
PanelBase panel)
Override this method to define the tabset |
void |
onBind(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.BindException errors)
Process the Siteworks protocol and process the WebManager Spring protocol. |
void |
onSubmit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors,
org.springframework.web.servlet.ModelAndView modelAndView)
Methods that override this method MUST call super.onSubmit in order to function properly. |
java.util.Map<java.lang.String,java.lang.Object> |
referenceData(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.Errors errors)
Add panel object to the model rendered by the PanelController. |
PanelTab |
setSingleTab(java.lang.String viewFileName,
DelegatedController controller,
javax.servlet.http.HttpServletRequest request)
Sets a single tab onto the panel. |
org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors,
java.util.Map controlModel)
Returns the Model and view to be used when rendering the form backing object that is returned by this controller |
| Methods inherited from class nl.gx.webmanager.springmvc.controller.component.ComponentController |
|---|
addEditView, addEditView, createResourceBaseNames, getBundleDefinitionId, getComponent, getParentController, onSubmit, onSubmit, onSubmit, referenceData, setBundleDefinitionId, setComponent, setDelegatedControllers, setParentController |
| Methods inherited from class nl.gx.webmanager.springmvc.controller.BaseWebmanagerController |
|---|
addControllerDelegation, addDisallowedField, addEditView, addEditViews, addResourceBaseName, addValidator, getControllerDelegationMap, getEditContext, getEditLanguageLabel, getEditViewByValue, getEditViews, getPresentationContext, getResourceBaseNames, getServletContextHack, getVersion, getWebsite, getWebsiteByRequest, getWmSession, initBinder, initialize, isReloadWebManager, onBindAndValidate, popNestedPath, pushNestedPath, removeControllerDelegation, setReloadWebManager, showForm |
| Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController |
|---|
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, processFormSubmission, setFormView, setSuccessView, suppressValidation |
| Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController |
|---|
currentFormObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleInvalidSubmit, handleRequestInternal, isBindOnNewForm, isFormSubmission, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm |
| Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
|---|
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, getWebBindingInitializer, initApplicationContext, isValidateOnBinding, onBind, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, setWebBindingInitializer, suppressBinding, suppressValidation, suppressValidation, useDirectFieldAccess |
| Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
|---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
| Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.gx.webmanager.springmvc.DelegatedController |
|---|
addValidator, getControllerDelegationMap, getEditViewByValue, getResourceBaseNames, getValidators, initBinder, initialize, onBindAndValidate |
| Field Detail |
|---|
public static final java.lang.String PANEL_TAB_ID_KEY
public static final java.lang.String COMMAND_OBJECT_KEY
public static final java.lang.String PANEL_ID_KEY
public static final java.lang.String WEB_ID_KEY
| Constructor Detail |
|---|
public PanelComponentController()
| Method Detail |
|---|
public java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
ComponentController
formBackingObject in interface DelegatedControllerformBackingObject in class ComponentControllerrequest - current HTTP request
javax.servlet.ServletException - in case of errors
public void onBind(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.BindException errors)
throws java.lang.Exception
onBind in interface DelegatedControlleronBind in class BaseWebmanagerControllerrequest - current HTTP requestcommand - the command object to perform further binding onerrors - validation errors holder, allowing for additional custom registration of binding errors
java.lang.Exception - in case of invalid state or arguments
public void onSubmit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors,
org.springframework.web.servlet.ModelAndView modelAndView)
throws java.lang.Exception
onSubmit in interface DelegatedControlleronSubmit in class BaseWebmanagerControllerrequest - current servlet requestresponse - current servlet responsecommand - form object with request parameters bound onto iterrors - Errors instance without errors (subclass can add errors if it wants to)modelAndView - the model and view prepared by the main spring controller
java.lang.Exception - in case of errors
public org.springframework.web.servlet.ModelAndView showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors,
java.util.Map controlModel)
throws java.lang.Exception
showForm in interface DelegatedControllershowForm in class ComponentControllerrequest - Current servlet requestresponse - Current servlet responseerrors - Errors instance without errors (subclass can add errors if it wants to)controlModel - The model passed by the platform controller
java.lang.Exception - in case of errors
public java.util.Map<java.lang.String,java.lang.Object> referenceData(javax.servlet.http.HttpServletRequest request,
java.lang.Object command,
org.springframework.validation.Errors errors)
throws java.lang.Exception
referenceData in interface DelegatedControllerreferenceData in class BaseWebmanagerControllerrequest - current HTTP requestcommand - the command object to perform further binding onerrors - validation errors holder, allowing for additional custom registration of binding errors
java.lang.Exception - in case of invalid state or argumentsModelAndViewprotected void createEditViews()
BaseWebmanagerController
createEditViews in class BaseWebmanagerControllerpublic WmEditView getEditView()
BaseWebmanagerController
getEditView in interface DelegatedControllergetEditView in class BaseWebmanagerController
public PanelTab setSingleTab(java.lang.String viewFileName,
DelegatedController controller,
javax.servlet.http.HttpServletRequest request)
viewFileName - controller - request -
public PanelTab addTab(java.lang.String tabId,
java.lang.String titleKey,
java.lang.String viewFileName,
DelegatedController controller,
javax.servlet.http.HttpServletRequest request)
tabId - unique tabId within this paneltitleKey - resourcebundle key for the tab title, not shown if emptyviewFileName - view file form this tab, may be null in the tab holds only subtabspanelViewCommandClass - command class for this tab, may be null in the tab holds only subtabs
if this is a maintab that holds only subtabs which operates as differant views
on the same command, set this command here.
public PanelTab addTab(java.lang.String tabId,
java.lang.String titleKey,
java.lang.String titleImage,
java.lang.String viewFileName,
DelegatedController controller,
java.lang.String presentationName,
javax.servlet.http.HttpServletRequest request)
tabId - unique tabId within this paneltitleKey - resourcebundle key for the tab title, not shown if emptytitleImage - image shown as title, not shown if emptyviewFileName - view file form this tab, may be null in the tab holds only
subtabspanelViewCommandClass - command class for this tab, may be null in the tab holds only
subtabs if this is a maintab that holds only subtabs which
operates as differant views on the same command, set this
command here.presentationName - may be either PanelTabset.LEVEL1_HORIZONTAL,
PanelTabset.LEVEL1_VERTICAL, PanelTabset.LEVEL2_HORIZONTAL,
PanelTabset.LEVEL2_VERTICAL or null if the presentationName
should not changed or the default should be set in case none
is set.
protected abstract void initializeTabSet(javax.servlet.http.HttpServletRequest request,
PanelBase panel)
protected DelegatedController getStatefulTabController(java.lang.Class clazz,
javax.servlet.http.HttpServletRequest request)
clazz - Class of the controller to retrieve an instance from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||