|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface is for objects that provide an automatic rendering capability to the system. It's in sort of a way a bridge between DBObjects and ControllerElements
| Method Summary | |
Block |
createDBObjectBlock(ControllerRequest request,
ControllerResponse response,
DataObject dbobj)
Creates a DBObject Block that contains all the non-secret fields for the DBObject. |
Block |
createDBObjectBlock(ControllerRequest request,
ControllerResponse response,
String title,
DataObject dbobj)
Creates a DBObject Block that contains all the non-secret fields for the DBObject. |
String |
getErrorStyle()
Allows for easy overriding fo the style name for special customization. |
String |
getNormalStyle()
Allows for easy overriding of the style name for special customization |
String |
getRequiredStyle()
Allows for easy overriding fo the style name for special customization. |
DataObject |
parseBlock(ControllerRequest request,
DataObject oneObject,
ErrorCollection ec)
Convienence method if you only expect one DBObject to be returned from a particular form. |
DataObject[] |
parseBlocks(ControllerRequest request,
DataObject[] theObjects,
ErrorCollection ec)
Parses the appropriate DBObject from the block. |
DataObject |
parseDBObject(ControllerRequest request,
DataObject oneObject,
ErrorCollection ec)
Convienence method if you only expect one DBObject to be returned from a particular form, and unlike the ParseBlock, there is no DBOBject name prefix attached to the parameter names. |
DataObject |
parseDBObject(ControllerRequest request,
DataObject oneObject,
ErrorCollection ec,
boolean validate)
|
String |
parseSingleInput(ControllerRequest request,
DataObject dbobj,
String fieldName,
String parameterName,
ErrorCollection ec)
Takes the Controller Request and appropriately parses a string for a particular field. |
Input |
renderDBObjectField(ControllerResponse response,
DataObject dbobj,
String fieldName,
String defaultValue,
boolean readOnly)
Renders an Input in a update method per field name. |
| Method Detail |
public Input renderDBObjectField(ControllerResponse response,
DataObject dbobj,
String fieldName,
String defaultValue,
boolean readOnly)
throws ControllerException
response - a ControllerResponse Objectdbobj - A DBObject to transform into an InputfieldName - the name of the field to renderdefaultValue - the default value to use in the fieldreadOnly - true if the Input should be a read only input.
ControllerException
public Block createDBObjectBlock(ControllerRequest request,
ControllerResponse response,
DataObject dbobj)
throws ControllerException
response - a ControllerResponse Objectrequest - The ControllerRequest Objectdbobj - The dbObject to automatically render.
ControllerException - if there's an error rendering the DBObject
public Block createDBObjectBlock(ControllerRequest request,
ControllerResponse response,
String title,
DataObject dbobj)
throws ControllerException
response - a ControllerResponse Objectrequest - The ControllerRequest Objecttitle - The title to give this block. The system renders a nested
Output called "block-title" for the block that contains this data.dbobj - The dbObject to automatically render.
ControllerException - if there's an error rendering the DBObject
public DataObject parseBlock(ControllerRequest request,
DataObject oneObject,
ErrorCollection ec)
throws ControllerException
request - The ControllerRequest object handed down by the frameworkoneObject - A single DBObject to fill into fill out from the block.ec - An instantiated ErrorCollection that is filled in with any error
DBObject
ControllerException - if there's an error parsing the block or communicating
with the underlying DBObject
IllegalArgumentException - if request, DBObjectNames, or ec is null
public DataObject parseDBObject(ControllerRequest request,
DataObject oneObject,
ErrorCollection ec)
throws ControllerException
request - The ControllerRequest object handed down by the frameworkoneObject - a Single DBObject to fill out.ec - An instantiated ErrorCollection that is filled in with any error
DBObject
ControllerException - if there's an error parsing the block or communicating
with the underlying DBObject
IllegalArgumentException - if request, DBObjectNames, or ec is null
public DataObject parseDBObject(ControllerRequest request,
DataObject oneObject,
ErrorCollection ec,
boolean validate)
throws ControllerException
ControllerException
public DataObject[] parseBlocks(ControllerRequest request,
DataObject[] theObjects,
ErrorCollection ec)
throws ControllerException
request - The ControllerRequest object handed down by the frameworktheObjects - A pre-instantiated group of DBObjects in which you expect
to have the fields overwritten/filled. By using instantiated DBObjects,
you can pre-fill any potentially blank fields and thus remove any Errors.ec - An instantiated ErrorCollection that is filled in with any error
DBObjects
ControllerException - if there's an error parsing the block or communicating
with the underlying DBObject
public String parseSingleInput(ControllerRequest request,
DataObject dbobj,
String fieldName,
String parameterName,
ErrorCollection ec)
throws ControllerException
request - the ControllerRequest objectfieldName - the name of the field to parsedbobj - The DBObject for which we're going to put the field toparameterName - The name of the http paramter to parse May be null
in which case, the funciton will by default use the fieldName as the
parameter name.ec - An instantiated ErrorCollection object that gets filled out
by the function.
ControllerException - if there's an error parsing the block or communicating
with the underlying DBObject
public String getNormalStyle()
throws ControllerException
ControllerException
public String getRequiredStyle()
throws ControllerException
ControllerException
public String getErrorStyle()
throws ControllerException
ControllerException
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||