| Home >> All >> org >> scopemvc >> controller |
| | org.scopemvc.controller.basic.* (2) | | org.scopemvc.controller.servlet.* (6) |
| | org.scopemvc.controller.servlet.jsp.* (2) | | org.scopemvc.controller.servlet.xml.* (2) |
| | org.scopemvc.controller.swing.* (1) |
Package Samples:
org.scopemvc.controller.servlet.xml: A servlet implementation that provides a simple implementation of the HMVC pattern for HTTP request handling.
org.scopemvc.controller.basic
org.scopemvc.controller.servlet.jsp
org.scopemvc.controller.servlet
org.scopemvc.controller.swing
Classes:
BasicController: Full implementation of Controller that adds: support for a View to notify its parent Controller when its bound model object is replaced with another (implemented completely in SwingView) via the CHANGE_MODEL_CONTROL_ID ControlID. Note that the PropertyView that a top-level Controller owns must not have a Selector set: this is only allowed for child Controllers that are delegated by a parent to handle a subview and associated submodel that is part of the parent model: the binding will be handled by the parent in this case. ControlException handling by using ViewContext.showError(java.lang.String, ...
ScopeServlet: Base class for a web app's servlet dispatcher: subclass this to implement application startup and initialisation (use a static initializer). This class accepts incoming requests, collects the parameters into a mutable HashMap, parses them to create a Control and to find a ViewID to identify the View the user interacted with. The request parameters are then passed to the View to populate its Model, before the View issues the Control for the owning Controller to handle. A configurable number of Application Controllers (and sub-Controllers and their Views and Models) are created on the first request. ...
ServletContext: A ViewContext that handles showView(), hideView() and showError() for servlet implementations. The showView() expects a ServletView that is asked to stream the currently visible Page to the HTTP Response's OutputStream. Two interesting behaviours can be customized with a ServletContext subclass: To handle errors with a global error page override showError(java.lang.String, java.lang.String) 55 to implement the required behaviour. Custom ServletContexts can be used for requests by overriding ScopeServlet.createServletContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, ...
ViewContext: ViewContext handles show/hide of views, errors and has some concept of the application's context. eg a Swing implementation would show views inside JFrames or JDialogs and show errors using JOptionPanes. A servlet implementation would know about the HTTP response and push views into its stream. There's a place in here to store properties per context. This is used in the servlet implementation to maintain state over a single request. Several static methods are used to set the context for an application either on a global basis (eg Swing) or per-thread (eg servlet): see getViewContext() 55 etc.
XSLScopeServlet: A org.scopemvc.controller.servlet.ScopeServlet for use in webapps that use org.scopemvc.view.servlet.xml : this initialises the SystemID of org.scopemvc.view.servlet.xml.AbstractXSLPage to point to the root of the deployed web archive, which is where all XSL files are referenced from. Also installs a XSLServletContext .
JSPScopeServlet: A org.scopemvc.controller.servlet.ScopeServlet for use in webapps that use org.scopemvc.view.servlet.jsp : this installs a JSPContext .
SwingContext: Swing implementation of org.scopemvc.controller.basic.ViewContext to show views inside JFrames or JDialogs and show errors using JOptionPanes. Also allows Views to take ownership of SMenuItems from their containing Window.
XSLServletContext: A ServletContext that that shows org.scopemvc.view.servlet.xml.AbstractXSLPage s.
JSPContext: A ServletContext that handles showView() for JSPView implementations by redirecting to a JSP.
| Home | Contact Us | Privacy Policy | Terms of Service |