|
|||||||||
| Home >> All >> org >> infohazard >> maverick >> [ view overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.infohazard.maverick.view
Class DocumentViewFactory

java.lang.Objectorg.infohazard.maverick.view.DocumentViewFactory
- All Implemented Interfaces:
- org.infohazard.maverick.flow.ViewFactory
- public class DocumentViewFactory
- extends java.lang.Object
- implements org.infohazard.maverick.flow.ViewFactory
- extends java.lang.Object
Factory for building JSP, Velocity, and other resource-based views which place the model bean in one of the servlet attribute collections and use the RequestDispatcher to forward to the actual content. This is also used for static documents.
This factory has certain options which can be defined when declaring the factory. The defaults are shown here:
<view-factory type="document" provider="org.infohazard.maverick.view.DocumentViewFactory"> <default-bean-name value="model"/> </view-factory>
- default-bean-name - If no "bean" attribute is specified for individual views, this is the key which will be used for placing the model in an attribute collection.
The options for an individual view are like this:
<view type="document" path="blah.jsp" scope="request" bean="model"/>
Scope can be one of request, session,
application. The default is request.
The default model name is specified on the factory, or "model" if nothing is defined.
Document views can have transforms by specifying a
"transform" child element.
| Field Summary | |
protected static java.lang.String |
ATTR_BEAN_NAME
The XML attribute name to specify the name for the "model" object ["bean"]. |
protected static java.lang.String |
ATTR_DEFAULT_BEAN_NAME
The XML attribute name to set a default "model" object name ["default-bean-name"]. |
protected static java.lang.String |
ATTR_SCOPE
The XML attribute name to specify the scope in which to store the "model" object ["scope"]. |
protected static java.lang.String |
DEFAULT_DEFAULT_BEAN_NAME
The default attribute name for the "model" object ["model"]. |
protected java.lang.String |
defaultBeanName
Property to hold the default name of the "model" object for this factory instance ["model"]. |
protected static java.lang.String |
SCOPE_APP
The XML attribute value to specify "global" or "application" scope. |
protected static java.lang.String |
SCOPE_REQUEST
The XML attribute value to specify "thread" or "request" scope. |
protected static java.lang.String |
SCOPE_SESSION
The XML attribute value to specify "client" or "session" scope. |
| Constructor Summary | |
DocumentViewFactory()
|
|
| Method Summary | |
org.infohazard.maverick.flow.View |
createView(org.jdom.Element viewNode)
Creates a specific instance of the View from the XML element in the maverick configuration file. |
void |
init(org.jdom.Element factoryNode,
javax.servlet.ServletConfig servletCfg)
Initialize this factory instance by initializing the #dispatchedViewFact property and the defaultBeanName 55
property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DEFAULT_DEFAULT_BEAN_NAME
protected static final java.lang.String DEFAULT_DEFAULT_BEAN_NAME
- The default attribute name for the "model" object ["model"].
- See Also:
- Constant Field Values
ATTR_DEFAULT_BEAN_NAME
protected static final java.lang.String ATTR_DEFAULT_BEAN_NAME
- The XML attribute name to set a default "model" object name
["default-bean-name"].
- See Also:
- Constant Field Values
ATTR_BEAN_NAME
protected static final java.lang.String ATTR_BEAN_NAME
The XML attribute name to specify the name for the "model" object ["bean"].
The default attribute setting would be
bean="model".- See Also:
- Constant Field Values
ATTR_SCOPE
protected static final java.lang.String ATTR_SCOPE
The XML attribute name to specify the scope in which to store the "model" object ["scope"].
The default attribute setting would be
scope="request".- See Also:
- Constant Field Values
SCOPE_APP
protected static final java.lang.String SCOPE_APP
The XML attribute value to specify "global" or "application" scope. ["application"]. An "model" object set to this scope is available to the entire application.
- See Also:
- Constant Field Values
SCOPE_SESSION
protected static final java.lang.String SCOPE_SESSION
The XML attribute value to specify "client" or "session" scope. ["session"]. An "model" object set to this scope is available to every request made by the same client during this application session.
- See Also:
- Constant Field Values
SCOPE_REQUEST
protected static final java.lang.String SCOPE_REQUEST
The XML attribute value to specify "thread" or "request" scope. ["request"]. An "model" object set to this scope is available to only within the thread of the current request.
- See Also:
- Constant Field Values
defaultBeanName
protected java.lang.String defaultBeanName
Property to hold the default name of the "model" object for this factory instance ["model"].
| Constructor Detail |
DocumentViewFactory
public DocumentViewFactory()
| Method Detail |
init
public void init(org.jdom.Element factoryNode, javax.servlet.ServletConfig servletCfg) throws org.infohazard.maverick.flow.ConfigException
Initialize this factory instance by initializing the
#dispatchedViewFactproperty and thedefaultBeanName55 property.- Specified by:
initin interfaceorg.infohazard.maverick.flow.ViewFactory
createView
public org.infohazard.maverick.flow.View createView(org.jdom.Element viewNode) throws org.infohazard.maverick.flow.ConfigException
- Description copied from interface:
org.infohazard.maverick.flow.ViewFactory - Creates a specific instance of the View from the XML element
in the maverick configuration file.
- Specified by:
createViewin interfaceorg.infohazard.maverick.flow.ViewFactory
|
|||||||||
| Home >> All >> org >> infohazard >> maverick >> [ view overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.infohazard.maverick.view.DocumentViewFactory