|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.view.servlet.ServletView
A container View to aggregate a set of Page
s the allows the currently
visible Page to be set.
In a servlet application, a Controller's View must 'contain' all the possible
pages that the user could be interacting with because the user is free to hit
the browser's forward and back buttons, use history or bookmarks etc. This
"View" therefore acts as a simple container for other Views (Page
s)
that represent the actual interfaces that the user interacts with. It
forwards any setController(org.scopemvc.core.Controller)
and setBoundModel(java.lang.Object)
calls to all
children.
A Controller in a web application must create an instance of ServletView to
put all its possible Pages into using addPage(org.scopemvc.view.servlet.Page)
. The Controller then
setView() establishes the container as the Controller's View. To determine
the Page that is shown to the user on showView
, call setVisible(java.lang.String)
with the Page ID.
Field Summary | |
protected java.util.List |
pages
The child Pages this ServletView contains. |
Constructor Summary | |
ServletView()
Create a container for the Pages that a Controller manages. |
Method Summary | |
void |
addPage(Page inPage)
Adds an element to the Page attribute of the ServletView object |
Page |
findPageByID(java.lang.String inViewID)
TODO: document the method |
java.lang.Object |
getBoundModel()
Gets the bound model |
Controller |
getController()
Gets the controller |
Page |
getFirstPage()
Used by ScopeServlet.findDefaultPage . |
Page |
getVisible()
Gets the visible |
void |
issueControl(Control inControl)
Note that ServletViews inherit their parent's Controller. |
void |
setBoundModel(java.lang.Object inModel)
The passed model is bound to this view and to all children ServletViews as well. |
void |
setController(Controller inController)
The parent Controller must register itself with the ServletView via this method in order to receive Controls from it. |
void |
setVisible(java.lang.String inViewID)
Sets the visible |
java.lang.String |
toString()
For debug. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.List pages
Constructor Detail |
public ServletView()
Method Detail |
public final java.lang.Object getBoundModel()
getBoundModel
in interface View
public final Controller getController()
getController
in interface View
public final void issueControl(Control inControl)
issueControl
in interface View
inControl
- TODO: Describe the Parameterpublic final Page getFirstPage()
ScopeServlet.findDefaultPage
.
public final Page getVisible()
public 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 parent Controller.public final void setVisible(java.lang.String inViewID)
inViewID
- The new visible valuepublic final void addPage(Page inPage)
inPage
- The element to be added to the Page attributepublic final Page findPageByID(java.lang.String inViewID)
inViewID
- TODO: Describe the Parameter
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |