org.apache.wicket.protocol.http.request.urlcompressing
Class UrlCompressingWebCodingStrategy

java.lang.Object
  extended by org.apache.wicket.protocol.http.request.WebRequestCodingStrategy
      extended by org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebCodingStrategy
All Implemented Interfaces:
IRequestCodingStrategy, IRequestTargetMounter, IRequestTargetMountsInfo

public class UrlCompressingWebCodingStrategy
extends WebRequestCodingStrategy

Use this CodingStategy with the UrlCompressingWebRequestProcessor to minimize the wicket:interface urls. The component path and the interface name will be removed from the url and only an uid will be inserted into the url. Use it like this:

 protected IRequestCycleProcessor newRequestCycleProcessor()
 {
        return new UrlCompressingWebRequestProcessor();
 }
 

Since:
1.3
Author:
jcompagner

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.protocol.http.request.WebRequestCodingStrategy
WebRequestCodingStrategy.Settings
 
Field Summary
 
Fields inherited from class org.apache.wicket.protocol.http.request.WebRequestCodingStrategy
BEHAVIOR_ID_PARAMETER_NAME, BOOKMARKABLE_PAGE_PARAMETER_NAME, DEFAULT_PAGEMAP_NAME, IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME, INTERFACE_PARAMETER_NAME, NAME_SPACE, PAGEMAP, RESOURCES_PATH_PREFIX
 
Constructor Summary
UrlCompressingWebCodingStrategy()
           
 
Method Summary
protected  CharSequence encode(RequestCycle requestCycle, IBookmarkablePageRequestTarget requestTarget)
          Encode a page class target.
protected  CharSequence encode(RequestCycle requestCycle, IListenerInterfaceRequestTarget requestTarget)
          Encode a listener interface target.
 
Methods inherited from class org.apache.wicket.protocol.http.request.WebRequestCodingStrategy
addBookmarkablePageParameters, addIgnoreMountPath, addInterfaceParameters, addInterfaceParameters, addResourceParameters, decode, decodePageMapName, doEncode, encode, encode, encode, encode, encode, encodePageMapName, getMountEncoder, getRequestPath, listMounts, mount, pathForTarget, rewriteStaticRelativeUrl, targetForRequest, unmount, urlCodingStrategyForPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlCompressingWebCodingStrategy

public UrlCompressingWebCodingStrategy()
Method Detail

encode

protected CharSequence encode(RequestCycle requestCycle,
                              IListenerInterfaceRequestTarget requestTarget)
Encode a listener interface target.

Overrides:
encode in class WebRequestCodingStrategy
Parameters:
requestCycle - the current request cycle
requestTarget - the target to encode
Returns:
the encoded url

encode

protected CharSequence encode(RequestCycle requestCycle,
                              IBookmarkablePageRequestTarget requestTarget)
Description copied from class: WebRequestCodingStrategy
Encode a page class target. If you override this method to behave different then also WebRequestCodingStrategy.addBookmarkablePageParameters(Request, RequestParameters) should be overridden to be in sync with that behavior.

Overrides:
encode in class WebRequestCodingStrategy
Parameters:
requestCycle - the current request cycle
requestTarget - the target to encode
Returns:
the encoded url


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