|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface extends the View interface to include explicit support for contained child views, called subviews. A class implementing this interface is able to manage a group of subviews, normally including them as portions of its presentation during rendering. The responsibilities of a container viw may include "pushing" information down to or summarizing information from subviews.
This interface does not specify whether managed child views are directly dependent on their container; however, in general, we prefer subviews that can be combined arbitrarily and which do not require explicit support from their managing container.
Furthermore, this implementation does not specify the way in which child views are added to a container view. This technique is currently left to implementations of this interface. This may change in the future, but has currently been left unspecified in order to allow optimized access to child views as the implementation sees fit. For example, a container may choose to create child views lazily as needed, thereby avoiding creation costs of subviews that are not used in the current request or context (this happens to be the current implementation in this package).
Fields inherited from interface com.iplanet.jato.view.View |
QUALIFIED_VIEW_NAME_SEPARATOR |
Method Summary | |
boolean |
beginChildDisplay(ChildDisplayEvent event)
Automatically called as notification that the JSP has begun its display processing on the named child. |
void |
beginDisplay(DisplayEvent event)
Automatically called as notification that the JSP has begun its display processing. |
java.lang.String |
endChildDisplay(ChildContentDisplayEvent event)
Automatically called as notification that the JSP has ended its display processing on the named child. |
void |
endDisplay(DisplayEvent event)
Automatically called as notification that the JSP has ended its display processing. |
View |
getChild(java.lang.String name)
Returns a contained child view by name. |
java.lang.String[] |
getChildNames()
Return the names of all contained subviews, in an order that is dependent on the container implementation. |
java.lang.Class |
getChildType(java.lang.String name)
Returns the class of the specified child by name |
Model |
getDefaultModel()
Returns this view's default model. |
DisplayField |
getDisplayField(java.lang.String name)
Returns the named DisplayField child. |
java.lang.Object |
getDisplayFieldValue(java.lang.String name)
Returns the value of the named DisplayField child. |
int |
getNumChildren()
Returns the number of subviews directly contained by this container. |
void |
mapRequestParameters(javax.servlet.http.HttpServletRequest request)
Maps servlet request parameter values into subviews. |
void |
resetChildren()
Resets all children to a default state in a container-defined way. |
void |
setDisplayFieldValue(java.lang.String name,
java.lang.Object value)
Sets the value of the named DisplayField child. |
Methods inherited from interface com.iplanet.jato.view.View |
getName, getParent, getQualifiedName, setParent |
Method Detail |
public java.lang.String[] getChildNames()
public int getNumChildren()
public java.lang.Class getChildType(java.lang.String name)
name
- The logical, non-qualified name of the childpublic View getChild(java.lang.String name)
IllegalAccessException
if the provided name is not the
name of a child contained in this container.name
- The logical name of the child viewpublic void resetChildren()
DisplayField
, these children may be set to contain default values.public DisplayField getDisplayField(java.lang.String name)
DisplayField
child.name
- The name of the DisplayField
child. This
child must implement the DisplayField
interface or this method throws an IllegalArgumentException
.DisplayField
child. This value
will never be null.DisplayField
public java.lang.Object getDisplayFieldValue(java.lang.String name)
DisplayField
child.name
- The name of the DisplayField
child. This
child must implement the DisplayField
interface or this method throws an IllegalArgumentException
.DisplayField
child value. This value
may be null.DisplayField
public void setDisplayFieldValue(java.lang.String name, java.lang.Object value)
DisplayField
child.name
- The name of the DisplayField
child. This
child must implement the DisplayField
interface or this method throws an IllegalArgumentException
.value
- The new DisplayField
child valueDisplayField
public void mapRequestParameters(javax.servlet.http.HttpServletRequest request) throws ModelControlException
This method is called at the beginning of a servlet request in order to initialize this container and its children with values appropriate to the current request.
This method is currently required in this interface to support the intervention needed by the container to prepare its subviews. For example, subviews may have not know that they are contained by another view, and unbeknownst to it, that view's values may be represented in a way that is container dependent. Thus, the container must be able to intervene in the mapping of values to contained views.
request
- The request object of the current servlet requestModelControlException
- Thrown if manipulation of a model fails during mappingpublic void beginDisplay(DisplayEvent event) throws ModelControlException
event
- The DisplayEvent.ModelControlException
- Thrown if manipulation of a model fails during display preparationpublic boolean beginChildDisplay(ChildDisplayEvent event) throws ModelControlException
event
- The ChildDisplayEventModelControlException
- Thrown if manipulation of a model fails during display preparationpublic java.lang.String endChildDisplay(ChildContentDisplayEvent event) throws ModelControlException
event
- The ChildContentDisplayEvent.ModelControlException
- Thrown if manipulation of a model fails during display preparationpublic void endDisplay(DisplayEvent event)
event
- The DisplayEvent.public Model getDefaultModel()
DisplayField
children for default value storage (if they
are not bound to any other model). This method should always return a valid
model instance. Note that the default model need not be an actual instance
of DefaultModel
, although this is usually the case.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |