| java.lang.Object uk.org.ponder.rsf.viewstate.ViewParamUtil
ViewParamUtil | public class ViewParamUtil (Code) | | Utilities for converting URL parameters to and from Objects (ViewParameters),
Maps, and Lists of various dizzying forms.
author: Antranig Basman (amb26@ponder.org.uk) |
Field Summary | |
final public static String | HIGH_PREFIX A prefix for a ViewParameters attribute representing a "surrogate" pathinfo
trunk segment. | final public static String | LOW_PREFIX An alternative representation of HIGH_PREFIX which will not take priority
when determining the overall viewID of a param set. |
HIGH_PREFIX | final public static String HIGH_PREFIX(Code) | | A prefix for a ViewParameters attribute representing a "surrogate" pathinfo
trunk segment. This is useful, for example when constructing a GET form which
is attempting to submit against a part of the view state which has been mapped
into the trunk path.
|
LOW_PREFIX | final public static String LOW_PREFIX(Code) | | An alternative representation of HIGH_PREFIX which will not take priority
when determining the overall viewID of a param set.
|
attrToIndex | public static int attrToIndex(String attrname)(Code) | | Convert a "surrogate" attribute name ("!0", "!1" etc) to its pathinfo index
or return -1 if not recognised.
|
getAnyFullURL | public static String getAnyFullURL(AnyViewParameters viewparams, ViewStateHandler vsh)(Code) | | Convert an AnyViewParameters to a full URL, using the supplied ViewStateHandler
in the case of a ViewParameters, or the contained URL in the case of
RawViewParameters.
|
getAttrIndex | public static String getAttrIndex(int index, boolean highpriority)(Code) | | Returns the "surrogate attribute name" corresponding to a given pathinfo
index and its priority level.
|
getCloner | public static DeepBeanCloner getCloner()(Code) | | Returns the standard RSF "DeepBeanCloner" bound to the current thread.
It is always undesirable to name beans in Java code, but this access is
necessary to permit ViewParameters objects to clone themselves in contexts
too small to inject this dependency.
|
toHTTPRequest | public static String toHTTPRequest(RawURLState rawstate)(Code) | | Returns the "mid-portion" of the URL corresponding to these parameters,
i.e. /view-id/more-path-info?param1=val¶m2=val#anchor
|
viewParamsToMap | public static Map viewParamsToMap(ViewStateHandler vsh, ViewParameters viewparams)(Code) | | Converts the portion of ViewParameters that will be rendered into URL
attributes into name/value pairs as a Map.
Parameters: vsh - The ViewStateHandler encoding URL information Parameters: viewparams - The ViewParameters object to be encoded A map of String to String holding the key/value pairs. |
|
|