Dashboard > WebWork > ... > Interceptors > Alias Interceptor
  WebWork Log In View a printable version of the current page.  
  Alias Interceptor
Added by Onyeje Bose, last edited by Onyeje Bose on Oct 18, 2005
Labels: 
(None)

The aim of this Interceptor is to alias a named parameter to a different named parameter. By acting as the glue between actions sharing similiar parameters (but with different names), it can help greatly with action chaining.

Action's alias expressions should be in the form of #{ "name1" : "alias1", "name2" : "alias2" }. This means that assuming an action (or something else in the stack) has a value for the expression named name1 and the action this interceptor is applied to has a setter named alias1, alias1 will be set with the value from name1.

Parameters

  • aliasesKey (optional) - the name of the action parameter to look for the alias map (by default this is aliases).

Extending the Interceptor

This interceptor does not have any known extension points.

Examples

<action name="someAction" class="com.examples.SomeAction">
    <!-- The value for the foo parameter will be applied as if it were named bar -->
    <param name="aliases">#{ 'foo' : 'bar' }</param>

    <!-- note: the alias interceptor is included with the defaultStack in webwork-default.xml -->
    <interceptor-ref name="alias"/>
    <interceptor-ref name="basicStack"/>
    <result name="success">good_result.ftl</result>
</action>

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators