Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Class Page  view Page download

  extended byorg.scopemvc.view.servlet.Page
All Implemented Interfaces:

public abstract class Page
extends java.lang.Object
implements org.scopemvc.core.View

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 Pages 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

causes 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.

$Revision: 1.7 $ $Date: 2002/01/26 09:46:20 $

Field Summary
private  java.lang.String id
          Unique ID.
private static org.apache.commons.logging.Log LOG
private  ServletView parent
          ServletView that contains this Page.
Constructor Summary
protected Page(java.lang.String inViewID)
          Create with a unique ID.
Method Summary
 boolean equalsID(java.lang.String inID)
 java.lang.Object getBoundModel()
 org.scopemvc.core.Controller getController()
 java.lang.String getID()
 ServletView getParent()
 void issueControl(org.scopemvc.core.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(org.scopemvc.core.Controller inController)
          Parent ServletView has a Controller, not each Page.
 void setParent(ServletView inServletView)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


private static final org.apache.commons.logging.Log LOG


private java.lang.String id
Unique ID.


private ServletView parent
ServletView that contains this Page.

Constructor Detail


protected Page(java.lang.String inViewID)
Create with a unique ID.

Method Detail


public final java.lang.String getID()


public final void setParent(ServletView inServletView)


public final ServletView getParent()


public final boolean equalsID(java.lang.String inID)


public final java.lang.Object getBoundModel()
Specified by:
getBoundModel in interface org.scopemvc.core.View


public final void setBoundModel(java.lang.Object inModel)
Parent ServletView is bound to a model, not each Page.

Specified by:
setBoundModel in interface org.scopemvc.core.View


public final void setController(org.scopemvc.core.Controller inController)
Parent ServletView has a Controller, not each Page.

Specified by:
setController in interface org.scopemvc.core.View


public final org.scopemvc.core.Controller getController()
Specified by:
getController in interface org.scopemvc.core.View


public void issueControl(org.scopemvc.core.Control inControl)
Issue Control via the parent ServletView.

Specified by:
issueControl in interface org.scopemvc.core.View


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.