|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.db.entity.MaintenanceDisplayElement
org.pajes.db.entity.Viewer
org.pajes.db.entity.DefaultViewer
Abstract super-class of all classes that create a Paje to edit or
display an Entity object.
All sub-classes MUST have a no-parameter constructor.
| Field Summary | |
static java.lang.String |
VIEWER_FACTORY
The name of the ServletContext attribute that can contain a PajeFactory instance that will generate generic forms
for displaying Entity objects. |
| Constructor Summary | |
DefaultViewer()
|
|
| Method Summary | |
protected HTML |
getCancelButton(Form form,
InputHidden action)
Returns the HTML object that will allow the user to exit the Viewer. |
Paje |
getPaje()
Returns a Paje to display and/or edit an Entity
object. |
protected Table |
getTable()
Returns the Table that can be used to display an Entity. |
protected void |
setViewerFactory(PajeFactory viewer)
Sets the Viewer factory object. |
| Methods inherited from class org.pajes.db.entity.Viewer |
build, getEntity, getScope, init, retrieve, setRequest |
| Methods inherited from class org.pajes.db.entity.MaintenanceDisplayElement |
clone, getManager, getRequest, getServletContext, init, init, isInitialised |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String VIEWER_FACTORY
PajeFactory instance that will generate generic forms
for displaying Entity objects.
| Constructor Detail |
public DefaultViewer()
| Method Detail |
public Paje getPaje()
throws java.io.IOException
Paje to display and/or edit an Entity
object.
The Paje to be returned will be determined as follows:
Viewer has been defined, it will be
requested to create a document.
Viewer has been defined, the
ServletContext will be searched for an attribute named
VIEWER_FACTORY, and the object returned by
ServletContext.getAttribute will be requested to create a
document. Context default Viewer factory objects should be created in
your Initialisation sub-class.
Once a document has been instantiated, the Container
identified by ViewerTemplate.ENTITY_CONTAINER_ID will be
retrieved. If this container is empty, the Table returned
by getTable() will be added to the container.
The Entity used to populate the Paje will be placed into the
HttpSession with the following method call:
request.getSession().setAttribute(this.getManager().getPrimaryKeyValues(entity), entity);
For compatibility with PAJES 2.1.x, the Entity will also be
placed into the HttpSession with the following method call:
request.getSession().setAttribute(this.getManager().getAdminServletName(), entity);
getPaje in class Viewerjava.io.IOException - if an IO exception occurs.Viewer.build(org.pajes.html.TraversableElement)
protected HTML getCancelButton(Form form,
InputHidden action)
The default implementation returns a SubmitButton with the value
"Cancel".
form - the form on which the object will be placed.action - the hidden field, named MaintenanceServlet.ACTION_PARAMETER, that must be updated with
MaintenanceServlet.CANCEL_ACTION_VALUE when this item is
selected by the user
protected Table getTable()
throws java.io.IOException
Table that can be used to display an Entity. All values will be displayed, except those where Attributes.getViewerPosition() returns a number less than zero.
Note that this method should return a new instance with each invocation, either by direct creation or by cloning. Under no circumstances should one instance be returned mulitple times.
java.io.IOException - if an IO exception occurs.protected void setViewerFactory(PajeFactory viewer)
viewer - the Viewer factory object.
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||