Importing Components

See Also

Third-party components can be created by component vendors or experienced Java programmers who follow the guidelines for packaging JavaServer Faces components for the IDE. The components are packaged in special component libraries that you can import into the IDE, making it available to be added to projects. To use a component library in a project, you add it to the project in the   and the IDE displays the components in the Palette when that project is open. Both tasks are described below.

To import a component library:

  1. From the main menu, choose Tools > Component Libraries.

    The Component Library Manager opens.

  2. Click the Import button at the bottom left of the Component Library Manager.
  3. In the Import Component Library dialog box, click Browse
  4. Navigate to the component library location and click Open.

    The path to the component library appears in the Import Component Library dialog box.

  5. Click OK.

    The component library appears in the Component Library Manager and is added to your user directory.

    In the Component Library Manager, you can see a list of the components in the library. To the right of each component name is the category under which it will be listed in the Palette. In the left Component Libraries pane, you can select individual JAR files that comprise the component library and see a list of their contents.

  6. Click Close to close the Component Library Manager.

To use a component library in a project:

  1. Open the Visual Web JSF project in which you want to use the library's components.
  2. In the  open the main project node and right-click the Component Libraries subnode.
  3. Choose Add Component Library.
  4. In the Add Component Library dialog box, you see a list of component libraries that you can add to your project.
  5. Select the library you want to add and click Add Component Library.

    There is a delay as the IDE adds the jars contained in the component library to the project's classpath and displays the components to the Palette.

    When you open a page of your project in the Visual Designer, you see the new components in the Palette under the category defined by the component library. You can drag the new components and drop them on pages you are editing in the Visual Designer, and you can work with these components just as you work with the components supplied with the IDE.

See Also
About Component Libraries
Import Component Library Dialog Box
Removing a Component Library
Updating a Component Library
Adding a Category to the Palette

Legal Notices

 

 

 
v