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.

  1. Create a custom component library.

  2. Create a custom component.
.

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:

  1. In the Page Data View, right-click

    Faces components.

  2. Select

    New | Component Attribute. The Define custom component attribute dialog opens.

  3. 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:

  1. In the Properties view of the <jsfc:component> tag, click

    Add. The Define custom component attribute dialog opens.

  2. 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.