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. |