Creating attributes for custom components
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.
.
There are two ways to create an attribute for a custom component:
Creating attributes using the Page Data View
To create an attribute for a custom component using the Page Data View:
- In the Page Data View, right-click
Faces components.
- Select
New | Component Attribute. The Define custom component attribute dialog opens.
- Specify the attribute name, class, and description. If the attribute is required select
Required attribute. Click Finish.
Once you have added your attributes to your custom component, you can use your custom components to create page content. To add the custom components to the palette, refer to Adding support for an existing component library. To distribute the components to other users, refer to Distributing a JSF component library. To bind data to your component, refer to Binding data to a JSF component.
Creating attributes using the Properties view
To create an attribute for a custom component using the Properties view:
- In the Properties view of the <jsfc:component> tag, click
Add. The Define custom component attribute dialog opens.
- Specify the attribute name, class, and description. If the attribute is required select
Required attribute. Click Finish.
Once you have added your attributes to your custom component, you can use your custom components to create page content. To add the custom components to the palette, refer to Adding support for an existing component library. To distribute the components to other users, refer to Distributing a JSF component library. To bind data to your component, refer to Binding data to a JSF component.