org.apache.wicket.request.target.coding
Class IndexedParamUrlCodingStrategy
java.lang.Object
org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy
org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy
- All Implemented Interfaces:
- IMountableRequestTargetUrlCodingStrategy, IRequestTargetUrlCodingStrategy
public class IndexedParamUrlCodingStrategy
- extends BookmarkablePageRequestTargetUrlCodingStrategy
Url coding strategy for bookmarkable pages that encodes index based parameters.
Strategy looks for parameters whose name is an integer in an incremented order starting with
zero. Found parameters will be appended to the url in the form
/mount-path/paramvalue0/paramvalue1/paramvalue2
When decoded these parameters will once again be available under their index (
PageParameters.getString("0"); )
- Author:
- Igor Vaynberg (ivaynberg)
IndexedParamUrlCodingStrategy
public IndexedParamUrlCodingStrategy(String mountPath,
Class bookmarkablePageClass)
- Construct.
- Parameters:
mountPath
- mount pathbookmarkablePageClass
- class of mounted page
IndexedParamUrlCodingStrategy
public IndexedParamUrlCodingStrategy(String mountPath,
Class bookmarkablePageClass,
String pageMapName)
- Construct.
- Parameters:
mountPath
- mount pathbookmarkablePageClass
- class of mounted pagepageMapName
- name of pagemap
appendParameters
protected void appendParameters(AppendingStringBuffer url,
Map parameters)
- Description copied from class:
AbstractRequestTargetUrlCodingStrategy
- Encodes Map into a url fragment and append that to the provided url buffer.
- Overrides:
appendParameters
in class AbstractRequestTargetUrlCodingStrategy
- Parameters:
url
- url so farparameters
- Map object to be encoded
decodeParameters
protected ValueMap decodeParameters(String urlFragment,
Map urlParameters)
- Description copied from class:
AbstractRequestTargetUrlCodingStrategy
- Decodes parameters object from the provided url fragment
- Overrides:
decodeParameters
in class AbstractRequestTargetUrlCodingStrategy
- Parameters:
urlFragment
- fragment of the url after the decoded path and before the query stringurlParameters
- query string parameters
- Returns:
- Parameters created from the url fragment and query string
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.