Portlet Factory, Version 6.1.2


 

About using arguments with an action

Arguments to an action list allow you to "explicitly parameterize" an action, that is, allow an action list to have different behaviors based on the values of some pieces of data, and be able to clearly identify and separate those data items from the general environment. This is in contrast with using the values of variables to control the flow or behavior of the action by referencing them directly from within the action list.

You would normally specify the arguments before writing the actions, since the arguments would typically be referenced by one or more of the actions. The arguments declared for the action list will appear in indirect reference pickers launched from that action list under the Arguments section. Choosing one of the action list arguments in such a picker will produce an indirect reference using the ${Arguments/argName} syntax.

Here is a typical example called from a button that submits a form:

A developer has created an action list called createUser. This action can be selected in the Action field of the Button, Link, Event Handler, Form Submit Action, and Image Button builders. It can also be selected in another ActionList in the Actions field, and in the Method Call builder in the Method to Call input field.

When selecting createUser, the Input Mappings section will be populated, allowing you to set values for the userName and isRemote arguments.

Note: The arguments are presented by position (Arg1, Arg2), not by name.

Action List:

CreateUser

Arguments:

userName String isRemote boolean

Actions:

!IF (${Arguments/isRemote}) THEN UserManagerLJO.createRemoteUser(${Arguments/userName})
!ELSE UserManagerLJO.createLocalUser(${Arguments/userName})
!ENDIF

Parent topic: Action List builder Related concepts

About using the builder call editor

About using special actions

Web Service Enable builder Related tasks

Creating a comment action

Creating an action that returns a value

Creating an action that assigns or appends a value to a variable

Creating conditional action lists

Profiling actions in an action list

Profiling actions on and off in an action list Related reference

Action List builder inputs

Comparison results Related information

Jakarta regexp package


Library | Support |