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
 //
 // http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.services.linktransform;
Allows for selective replacement of the default org.apache.tapestry5.Link used to represent a component event request. This is a service, but also the contribution to the service, as a chain of command.

This transformer follows the same pattern as PageRenderLinkTransformer.

Since:
5.2.0
{
    
Allows the default Link created for the component event request to be replaced.

Parameters:
defaultLink the default Link generated for a component event request
parameters used to create the default Link
Returns:
a replacement Link, or null
    Link transformComponentEventLink(Link defaultLinkComponentEventRequestParameters parameters);

    
Attempts to decode the page render request, to perform the opposite action for transformComponentEventLink(org.apache.tapestry5.Link,org.apache.tapestry5.services.ComponentEventRequestParameters). 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 org.apache.tapestry5.internal.services.ComponentEventDispatcher and a non-null value returned from this method will prevent the default ComponentEventLinkEncoder#decodeComponentEventRequest(Request ) method from being invoked.

Returns:
decoded parameters, or null to proceed normally
See also:
org.apache.tapestry5.services.LocalizationSetter.setLocaleFromLocaleName(java.lang.String)
New to GrepCode? Check out our FAQ X