| java.lang.Object com.jcorporate.expresso.ext.velocity.ExpressoTool
ExpressoTool | public class ExpressoTool (Code) | | A generic object that allows Velocity pages to be written more user friendly.
author: David Lloyd author: author: author: author: $Log: ExpressoTool.java,v $ author: Revision 1.5 2004/11/18 02:03:29 lhamel author: cosmetic reformat author: Revision 1.4 2004/11/17 20:48:16 lhamel author: cosmetic reformat author: author: Revision 1.3 2004/09/29 07:05:01 mtraum author: added license to source files author: author: Revision 1.2 2004/09/22 05:11:55 mtraum author: organize imports author: author: Revision 1.1 2004/05/29 16:51:31 dlloyd author: Initial checkin of velocity support |
getElement | public Object getElement(ControllerResponse response, String path) throws ControllerException(Code) | | Find a ControllerElement in the response identified by a path.
This path is somewhat similar to the paths used in the taglibs. The differences
are that a leading '/' means start from the controller response and a '@' means
to return the string which is the attribute by the name that follows. Also, if
the path item name cannot be found and the name starts with one of 'BLOCK:',
'OUTPUT:', 'INPUT:', or 'TRANSITION:', then the prefix is removed and the search
is made again limited to the type of object specified.
An example use in Velocity:
#exp_element( $myelement "lists/groups/tests" )
returns the element named 'tests'
#exp_element( $myelement "lists/BLOCK:groups/tests" )
returns the same element named 'tests' as above but useful if
an object named groups exists in transitions (for example).
#exp_element( $myelement "lists/groups/@style" )
returns the string for attribute 'style' in 'groups'
Parameters: response - The controllerResponse request attribute. Parameters: path - The path to the element or attribute to be returned. The found object or null. |
getElementFrom | public Object getElementFrom(ControllerResponse response, ControllerElement from, String path) throws ControllerException(Code) | | Find a ControllerElement in the response identified by a path.
This path is somewhat similar to the paths used in the taglibs. The differences
are that a leading '/' means start from the controller response and a '@' means
to return the string which is the attribute by the name that follows. Also, if
the path item name cannot be found and the name starts with one of 'BLOCK:',
'OUTPUT:', 'INPUT:', or 'TRANSITION:', then the prefix is removed and the search
is made again limited to the type of object specified. If the from parameter is null
or the path starts with a '/' then this function behaves the same as
getElement(response, path).
An example use in Velocity:
#exp_elementFrom( $myelement $fromElement "lists/groups/tests" )
returns the element named 'tests'
#exp_element( $myelement $fromElement "lists/BLOCK:groups/tests" )
returns the same element named 'tests' as above but useful if
an object named groups exists in transitions (for example).
#exp_element( $myelement $fromElement "lists/groups/@style" )
returns the string for attribute 'style' in 'groups'
Parameters: response - The controllerResponse request attribute. Parameters: path - The path to the element or attribute to be returned. Parameters: from - The ControllerElement to start the search from. The found object or null. |
getSchemaList | public List getSchemaList(String dataContext) throws DBException(Code) | | Returns the list of installed schemas. This would commonly be used to support the
current expresso tradition of listin the installed components in the left menu.
Parameters: dataContext - The data context for SchemaList (typically 'default'). The SchemaList. |
getString | public String getString(ControllerResponse response, String code, List args) throws ControllerException(Code) | | Return a string in the messages bundles. The current schema stack is seached for the
correct translation. This is a wrapper for Messages.getString(stack,locale,code,args).
Parameters: response - The controllerResponse request attribute that contains the schema stack. Parameters: code - The string code being searched for. Parameters: args - Any replacement arguments; can be null. The code translation if found, otherwise the code itself. |
|
|