|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy
public class MixedParamUrlCodingStrategy
Url coding strategy for bookmarkable pages that encodes a set of given parameters in the url's path path and the rest in the querystring.
Strategy looks for path-parameters whose name is read from an array of
names e.g. ["param0", "param1"]. Found parameters will be appended to the url in
the form /mount-path/paramvalue0/paramvalue1
.
All other parameters are added as parameter in the form:
/mount-path/paramvalue0?otherparam0=otherparamvalue0&otherparam1=otherparamvalue1
.
Decode is symmetric except for when a path parameter that is not at the end has no value during encode. For example, the names for the path parameters are: "a", "b" and "c". When "b" is not specified upon encoding, but "c" is, upon a decode "b" will get the empty string as value. When both "b" and "c" are missing on encode, the will not get a value during decode.
Field Summary |
---|
Fields inherited from class org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy |
---|
bookmarkablePageClassRef |
Constructor Summary | |
---|---|
MixedParamUrlCodingStrategy(java.lang.String mountPath,
java.lang.Class bookmarkablePageClass,
java.lang.String[] parameterNames)
Construct. |
|
MixedParamUrlCodingStrategy(java.lang.String mountPath,
java.lang.Class bookmarkablePageClass,
java.lang.String pageMapName,
java.lang.String[] parameterNames)
Construct. |
Method Summary | |
---|---|
protected void |
appendParameters(AppendingStringBuffer url,
java.util.Map parameters)
Encodes Map into a url fragment and append that to the provided url buffer. |
protected ValueMap |
decodeParameters(java.lang.String urlFragment,
java.util.Map urlParameters)
Decodes parameters object from the provided url fragment |
Methods inherited from class org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy |
---|
decode, encode, matches, toString |
Methods inherited from class org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy |
---|
getMountPath, matches, urlDecode, urlDecodePathComponent, urlDecodeQueryComponent, urlEncode, urlEncodePathComponent, urlEncodeQueryComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MixedParamUrlCodingStrategy(java.lang.String mountPath, java.lang.Class bookmarkablePageClass, java.lang.String pageMapName, java.lang.String[] parameterNames)
mountPath
- mount pathbookmarkablePageClass
- class of mounted pagepageMapName
- name of pagemapparameterNames
- the parameter names (not null)public MixedParamUrlCodingStrategy(java.lang.String mountPath, java.lang.Class bookmarkablePageClass, java.lang.String[] parameterNames)
mountPath
- mount path (not empty)bookmarkablePageClass
- class of mounted page (not null)parameterNames
- the parameter names (not null)Method Detail |
---|
protected void appendParameters(AppendingStringBuffer url, java.util.Map parameters)
appendParameters
in class AbstractRequestTargetUrlCodingStrategy
url
- url so farparameters
- Map object to be encodedprotected ValueMap decodeParameters(java.lang.String urlFragment, java.util.Map urlParameters)
decodeParameters
in class AbstractRequestTargetUrlCodingStrategy
urlFragment
- fragment of the url after the decoded path and before the query stringurlParameters
- query string parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |