|
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.Editor
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.
| Constructor Summary | |
Editor()
|
|
| Method Summary | |
protected void |
build(TraversableElement form)
Populates the input field elements on the specified form. |
void |
init(Manager manager,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
boolean isNew)
Deprecated. 2.1.1 - use init(Manager, ServletContext) and
setRequest(HttpServletRequest, boolean). |
boolean |
isNew()
Returns true if a new Entity should be created, rather than retrieving an existing Entity. |
protected Entity |
retrieve()
Returns the Entity object to be displayed. |
void |
setRequest(javax.servlet.http.HttpServletRequest request,
boolean isNew)
Sets the request that this instance of the Editor will show. |
| Methods inherited from class org.pajes.db.entity.Viewer |
getEntity, getPaje, getScope, init, 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 |
| Constructor Detail |
public Editor()
| Method Detail |
public boolean isNew()
public void setRequest(javax.servlet.http.HttpServletRequest request,
boolean isNew)
throws EntityNotFoundException,
java.io.IOException,
java.sql.SQLException
request - the request object.isNew - true if a new entity is being created.
EntityNotFoundException - if the Entity to be edited does not
exist.
java.io.IOException - if an IO exception occurs.
java.sql.SQLException - if an error occurs retrieving the Entity
objects.
public void init(Manager manager,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
boolean isNew)
throws EntityNotFoundException,
java.io.IOException,
java.sql.SQLException
init(Manager, ServletContext) and
setRequest(HttpServletRequest, boolean).
manager - the Manager that manages the Entity object to be
viewed.context - the ServletContext.request - the request object.isNew - true if the editor Paje is to be returned empty so that a
new Entity may be created, or false if an Entity is to be
retrieved based on the request parameters, and
then used to populate the form input fields.
EntityNotFoundException - if the Entity to be edited does not
exist.
java.io.IOException - if an IO exception occurs.
java.sql.SQLException - if an error occurs retrieving the Entity
objects.
protected void build(TraversableElement form)
throws EntityNotFoundException,
java.io.IOException,
java.sql.SQLException
If the isNew() method returns false, the required
Entity object specified by the scope is
retrieved. If it returns true, a new Entity will
be created by calling Manager.create().
build in class Viewerform - the form on which the input field elements are to be
populated.
EntityNotFoundException - if the Entity does not exist.
java.io.IOException - if an IO exception occurs.
java.sql.SQLException - if an error occurs retrieving the Entity
object.Entity.assignInputFieldValues(org.pajes.html.TraversableElement)
protected Entity retrieve()
throws EntityNotFoundException,
java.sql.SQLException
Entity object to be displayed. The method is called
by the Viewer.init(org.pajes.db.entity.Manager,
javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
method, before calling the init(org.pajes.db.entity.Manager, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, boolean) method.
This implementation returns either a new Entity, or the Entity returned
by Viewer.retrieve(), depending upon whether the request is to
edit a new Entity or not.
retrieve in class ViewerEntityNotFoundException - if the Entity requested by the Scope
does not exist.
java.sql.SQLException - if an error occurs retrieving the Entity
objects.Viewer.getScope()
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||