Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Copyright 2010 The Apache Software Foundation
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
Allows the default org.apache.tapestry5.Link for a page render request to be replaced. This is a service, but also the contribution to the service, as a chain of command.

A contributed implementation of this interface is expected to identify which requests it wants to transform. The transformPageRenderLink(org.apache.tapestry5.Link, method can return a org.apache.tapestry5.Link that is allowed to differ from Tapestry normal default. Later, when that request is triggered, decodePageRenderRequest( is required to reverse the operation, identifying the original parameters so that request handling can continue.

public interface PageRenderLinkTransformer
Transforms a page render link.

defaultLink default Link for this request
parameters that define the request
replacement Link, or null
    Link transformPageRenderLink(Link defaultLinkPageRenderRequestParameters parameters);

Attempts to decode the page render request, to perform the opposite action for transformPageRenderLink(org.apache.tapestry5.Link, The transformer is also responsible for identifying the locale in the request (as part of the path, or as a query parameter or cookie) and setting the locale for the request.

This method will be invoked from the and a non-null value returned from this method will prevent the default method from being invoked.

decoded parameters, or null to proceed normally
See also:
New to GrepCode? Check out our FAQ X