Designing and Implementing Composite Applications : webMethods CAF Development Help : Working with the Bindings View : Creating a New Action Method
Creating a New Action Method
When designing a user interface in Composite Application Framework, you can use this procedure to create a new action method that is invoked by a command.
When you create the method, you can select the Implement this Action as Data Flow option if you want to use binding expressions to assign data from a source to a destination and call other actions without any coding. By default, each page bean has an Initialize() method. You can use the Data Flow Implementation to define data flow for initializing the action. The method is called before the page is rendered the first time.
To create a new action method in a page managed bean
1. In the Navigation view, open a project, then open the portlet view you want work with in the view editor.
2. In the Bindings view, right-click the page managed bean, and then select Add > Action.
3. In the Add New Action Method wizard, type a name for the method in Action Name field and do one of the following:
*Select the Implement this action as a Data Flow and click Next to specify target and source properties for a data flow, and then click Finish.
*Click Finish to create the action method without a data flow.
The method appears as an action on the Bindings view beneath the managed bean.
4. In the Bindings view, double-click the newly created method to open it in the Java editor.
5. In the Java editor, type the method, for example:
}
public void doSomething()
{ System.out.println("something");
}
{
6. Click File > Save.
7. Click the tab for the view editor.
8. To use the method on the page, drag it from the Bindings view to the design canvas.
By default, a Command button appears on the design canvas when you drop the action, with an automatic binding to the method.
Copyright © 2016- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback