Binding a Visual Web JSF List Component to a Web Service Method
See Also
In projects with Visual Web JSF support, you can bind a component to a web service method. When you bind a list component to a web service, you create a connection between them. List components display one or more values at a time. For easiest data binding, use components from the Basic category of the Palette, such as Listbox, Drop Down List, Checkbox Group, or Radio Button Group.
After you add a web service to the IDE and to a Visual Web JSF page, you can call a web service's method by using either of the following techniques:
- Bind a method to a component. You can use this technique to view the results of the method, but you cannot update it. You do not need to write any Java code.
- Call the method in your
Java code. You can use this technique to view or update the web service.
The examples in the following procedures describe how to call the same web service
method by using both techniques.
To bind a list component to a method:
- If the web service is not part of the IDE,
add the web service to the IDE.
- Drag and drop the method onto the component.
- Right-click the component and choose Bind to Data.
- In the Bind to Data dialog box, click the Bind to an Object tab.
- Choose the method's data provider.
- Select the value field and display field for the component.
To call a method in your Java code:
- If the web service is not part of the IDE,
add the web service to the IDE.
- If the web service has not been added to the page, drag it to the Visual Designer.
- You can select a method to see its properties in the
Properties window.
- You can test the web service's methods by completing the following steps:
- Expand the web-service-name node.
- Right-click the method and choose Test Method.
- Type a test value for the parameters and click Submit.
- View the results and click Close.
- Call the method in your Java code.
- See Also
- About Web Services
- Adding a Web Service to the IDE
- Binding a Simple Component to a Web Service Method
- Binding a Table Component to a Web Service Method
- Projects Window
- Editing Source Files
Legal Notices