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

Quick Search    Search Deep

org.infohazard.maverick.view
Class DocumentView  view DocumentView download DocumentView.java

java.lang.Object
  extended byorg.infohazard.maverick.view.DocumentView
All Implemented Interfaces:
org.infohazard.maverick.flow.View

public abstract class DocumentView
extends java.lang.Object
implements org.infohazard.maverick.flow.View

DocumentView is the base class for the default Maverick "document" view type.

A DocumentView is a org.infohazard.maverick.flow.View that sets up a "model" object in request or session scope and forwards to another resource to render the final response. The "model" object exposes dynamic data so that it can be rendered as part of the response.

This class is used by the Maverick DocumentViewFactory. The DocumentViewFactory defines the abstract SetAttribute method for each instance according to the parameters passed through the View XML element.

By default, a DocumentView will be associated with a DispatchedView that uses the RequestDispatcher to forward control to another resource (e.g. service or servlet that renders a server page).


Field Summary
protected  java.lang.String beanName
           The name of the bean in the appropriate scope attributes.
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
DocumentView(java.lang.String beanName)
           Convenience constructor to pass the "model" object name and the aggregated org.infohazard.maverick.flow.View.
 
Method Summary
 void go(org.infohazard.maverick.flow.ViewContext vctx)
           Entry method that initiates the View rendering process.
protected abstract  void setAttribute(org.infohazard.maverick.flow.ViewContext vctx)
           Template method that can be used to place the "model" object in whatever scope is appropriate for this View element instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

beanName

protected java.lang.String beanName

The name of the bean in the appropriate scope attributes.

Constructor Detail

DocumentView

public DocumentView(java.lang.String beanName)

Convenience constructor to pass the "model" object name and the aggregated org.infohazard.maverick.flow.View.

Method Detail

go

public void go(org.infohazard.maverick.flow.ViewContext vctx)
        throws java.io.IOException,
               javax.servlet.ServletException

Entry method that initiates the View rendering process. Here, the DocumentView sets the the "model" object to the appropriate scope and invokes the #forward View to complete the response.

Specified by:
go in interface org.infohazard.maverick.flow.View

setAttribute

protected abstract void setAttribute(org.infohazard.maverick.flow.ViewContext vctx)

Template method that can be used to place the "model" object in whatever scope is appropriate for this View element instance.

The DocumentViewFactory provides an implementation of this method appropriate to the View parameters passed from the Maverick configuration document.