Binding a Visual Web JSF List Component to an Enterprise JavaBean Method
See Also
In projects with Visual Web JSF support, when you bind a list component to an Enterprise JavaBean component (enterprise bean), 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.
- Note: At this time, the IDE supports only Enterprise JavaBeans 2.1.
After you add the Enterprise JavaBean component to the IDE and to the page, you can call an enterprise bean 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 enterprise bean.
The examples in the following procedures describe how to call the same
method using both techniques.
To bind a list component to a method:
- If the enterprise bean is not part of the IDE, add the
enterprise bean 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 Data Provider 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 enterprise bean is not part of the IDE, add the enterprise bean to the IDE.
- If the enterprise bean has not been added to the page, drag it to the Visual Designer.
- If desired, select a method to see its properties in the Properties window.
- Call the method in your Java code.
- See Also
- About Enteprise JavaBean Components
- Adding a Set of Enterprise JavaBean Components to the IDE
- Projects Window
- Editing Source Files
Legal Notices