Binding a Simple Visual Web JSF Component to an Enterprise JavaBean Method

See Also

In projects with Visual Web JSF support, when you bind a simple component to an Enterprise JavaBean component (enterprise bean), you create a connection between the component and the enterprise bean method. Simple components display one value at a time. For easiest data binding, use components from the Basic category of the Palette, such as Button or Hyperlink.

After you add the Enterprise JavaBean component (enterprise bean) to the IDE and to the page, you can call an enterprise bean method by using either of the following techniques:

The examples in the following procedures describe how to call the same method using both techniques.

To bind a simple component to a method:

  1. If the enterprise bean is not part of the IDE, add the enterprise bean to the IDE.
  2. Drag and drop the method onto the component.
  3. Right-click the component and choose Bind to Data.
  4. In the Bind to Data dialog box, click the Bind to Data Provider tab.
  5. Choose the method's data provider.
  6. Select the data field to display in the component.

To call a method in your Java code:

  1. If the enterprise bean is not part of the IDE, add the enterprise bean to the IDE.
  2. If the enterprise bean has not been added to the page, drag it to the Visual Designer.
  3. If desired, select a method to see its properties in the Properties window.
  4. 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