|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.view.servlet.Page
Base class for views used by servlet implementation.
Pages in a browser do not communicate with the web server, so this class does not implement ModelChangeListener. Model objects in a web application shouldn't bother to implement ModelChangeEventSource unless change notification is used for some purpose other than updating Views.
In a servlet application, a Controller must use a ServletView
that
contains all possible Page
s that the Controller can show.
Pages must be created with unique View IDs to allow incoming requests to be linked to the correct parent View instance in ScopeServlet. eg
http://localhost/scope/servlet/Test?view=TestView&action=TestControlcauses the View with ID "TestView" to issue a Control whose ID is "TestControl".
The concrete implementation will need to support the appropriate ViewContext: for example a JSPPage is tailored for use by the JSPContext whereas a ServletXSLPage offers a different API to the XSLServletContext.
Constructor Summary | |
protected |
Page(java.lang.String inViewID)
Create with a unique ID. |
Method Summary | |
boolean |
equalsID(java.lang.String inID)
TODO: document the method |
java.lang.Object |
getBoundModel()
Gets the bound model |
Controller |
getController()
Gets the controller |
java.lang.String |
getID()
Gets the ID |
ServletView |
getParent()
Gets the parent |
void |
issueControl(Control inControl)
Issue Control via the parent ServletView. |
java.util.List |
populateModel(java.util.HashMap inParameters)
Called from ScopeServlet.doPost . |
void |
setBoundModel(java.lang.Object inModel)
Parent ServletView is bound to a model, not each Page. |
void |
setController(Controller inController)
Parent ServletView has a Controller, not each Page. |
void |
setParent(ServletView inServletView)
Sets the parent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Page(java.lang.String inViewID)
inViewID
- TODO: Describe the ParameterMethod Detail |
public final java.lang.String getID()
public final ServletView getParent()
public final java.lang.Object getBoundModel()
getBoundModel
in interface View
public final Controller getController()
getController
in interface View
public void issueControl(Control inControl)
issueControl
in interface View
inControl
- TODO: Describe the Parameterpublic final void setParent(ServletView inServletView)
inServletView
- The new parent valuepublic final void setBoundModel(java.lang.Object inModel)
setBoundModel
in interface View
inModel
- The new boundModel valuepublic final void setController(Controller inController)
setController
in interface View
inController
- The new controller valuepublic final boolean equalsID(java.lang.String inID)
inID
- TODO: Describe the Parameter
public java.util.List populateModel(java.util.HashMap inParameters)
Called from ScopeServlet.doPost
.
Implementing this method is optional -- Pages don't have to support population of their model. The default implementation here does nothing.
inParameters
- TODO: Describe the Parameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |