Creating a custom component library
A custom component library contains new and modified JSF components that you can use in your Web applications and distribute the libraries to your development team.
A custom component library is a Faces-enabled Web project with the Faces component development facet selected. Each custom component is created in a separate JSP. After one or more JSPs are created, the project is built and a new custom tag library is generated automatically. The custom JSF components can be added to Web pages.
In order to create user interfaces that use JSF components that you have created or customized you will need to do the following:
- Create a custom component library. The custom component library holds all of your custom components.
- Create custom components in the library. The custom components are the JSF tags that you add to your Web pages to create UI.
- Configure the properties for the custom component tag to define and bind new attributes to the components that you create.
- Add support for your custom library.
- Distribute a JSF component library.
Creating a custom component library project
To create a component library project:
- Click
File | New | Project | Web | Faces Component Library. Click Next. The New Faces Component Library wizard opens.
- In the Project name field, enter the name of your component library.
- Select a Target Runtime from the drop down list.
- In the Configurations drop down list, select
Faces Component Library, then click Finish. The project facets that you require to create a custom component library are automatically selected. Your custom component library project is created.
Once you have created the custom library project, you can Add custom components to the custom library.