| java.lang.Object uk.org.ponder.rsf.util.RSFUtil
RSFUtil | public class RSFUtil (Code) | | Low-level utilities for working on RSF component trees.
author: Antranig Basman (antranig@caret.cam.ac.uk) |
Method Summary | |
public static void | addBasicFormParameter(UIContainer local, UIParameter toadd) A convenience method that assumes the BasicFormModel (uses findBasicForm
above). | public static void | addResultingViewBinding(UIParameterHolder holder, String viewParamsPath, String requestPath) Adds a "deferred resulting view" EL binding to the supplied UIComponent. | public static void | addTransitBinding(ParameterList paramlist, String source, String transit, String dest) Adds a binding to the supplied parameter list that will assign the EL
expression source to transit and then
transit to dest , a classic usage of
"whole-object validation through transit". | public static int | commonPath(String s1, String s2) | public static String | computeFullID(UIComponent tocompute) See
UIComponent for the operation of this algorithm. | public static void | failRemove(UIComponent failed) | public static UIForm | findBasicForm(UIContainer tocheck) This method returns an enclosing Form instance, where one is present in the
tree. | public static ViewRoot | findViewRoot(UIComponent tofind) | public static String | getFullIDSegment(String ID, String localID) | public static ComponentList | getRootPath(UIComponent leaf) | public static boolean | isBound(UIComponent tocheck) Determines whether the supplied component has a bound value, and hence will
be visible to fossilized bindings/RSVC processing. | public static String | reportPath(UIComponent branch) |
addBasicFormParameter | public static void addBasicFormParameter(UIContainer local, UIParameter toadd)(Code) | | A convenience method that assumes the BasicFormModel (uses findBasicForm
above). Adds the supplied name/value pair to the nearest enclosing form
control.
|
addResultingViewBinding | public static void addResultingViewBinding(UIParameterHolder holder, String viewParamsPath, String requestPath)(Code) | | Adds a "deferred resulting view" EL binding to the supplied UIComponent.
This will transfer a value from an EL path in the request context to a
particular path withing the outgoing ViewParameters state for the coming
action cycle, assuming that it completes without error.
|
addTransitBinding | public static void addTransitBinding(ParameterList paramlist, String source, String transit, String dest)(Code) | | Adds a binding to the supplied parameter list that will assign the EL
expression source to transit and then
transit to dest , a classic usage of
"whole-object validation through transit".
|
commonPath | public static int commonPath(String s1, String s2)(Code) | | Returns the common ancestor path of s1 and s2 *
|
findBasicForm | public static UIForm findBasicForm(UIContainer tocheck)(Code) | | This method returns an enclosing Form instance, where one is present in the
tree. Note that this only makes sense for HTML-style forms, and is a coding
convenience. For alternative form models, client code must keep records of
the UIForm instance themselves.
|
findViewRoot | public static ViewRoot findViewRoot(UIComponent tofind)(Code) | | This method returns an enclosing ViewRoot instance, where one is present in
the tree (it should be, in every well-formed tree)
|
isBound | public static boolean isBound(UIComponent tocheck)(Code) | | Determines whether the supplied component has a bound value, and hence will
be visible to fossilized bindings/RSVC processing. It must not only be an
instance of
UIBound , but also have a non-null binding.
|
|
|