org.apache.wicket.request.target.coding
Class IndexedParamUrlCodingStrategy

java.lang.Object
  extended by org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy
      extended by org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy
          extended by 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)

Field Summary
 
Fields inherited from class org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy
bookmarkablePageClassRef
 
Constructor Summary
IndexedParamUrlCodingStrategy(java.lang.String mountPath, java.lang.Class bookmarkablePageClass)
          Construct.
IndexedParamUrlCodingStrategy(java.lang.String mountPath, java.lang.Class bookmarkablePageClass, java.lang.String pageMapName)
          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

IndexedParamUrlCodingStrategy

public IndexedParamUrlCodingStrategy(java.lang.String mountPath,
                                     java.lang.Class bookmarkablePageClass)
Construct.

Parameters:
mountPath - mount path
bookmarkablePageClass - class of mounted page

IndexedParamUrlCodingStrategy

public IndexedParamUrlCodingStrategy(java.lang.String mountPath,
                                     java.lang.Class bookmarkablePageClass,
                                     java.lang.String pageMapName)
Construct.

Parameters:
mountPath - mount path
bookmarkablePageClass - class of mounted page
pageMapName - name of pagemap
Method Detail

appendParameters

protected void appendParameters(AppendingStringBuffer url,
                                java.util.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 far
parameters - Map object to be encoded

decodeParameters

protected ValueMap decodeParameters(java.lang.String urlFragment,
                                    java.util.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 string
urlParameters - query string parameters
Returns:
Parameters created from the url fragment and query string


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.