Adding a Component to a Web Application

Develop a new JavaServer Faces (JSF) Component. Using the Component section of the JSF Application Configuration editor Component page, register a component and its associated classes.

Generally, a JSF component is composed of a set of classes, such as the component class, its render class, and so on. See the JSF specification and tutorial on java.sun.com for component development details.

  1. In the Web Application Development perspective of the WorkSpace Navigator, select faces-config.xml.
  2. Select the Component tab of the editor.
  3. Expand the Components section.
  4. Click Add. A new component with the default name "New Component x" is added to the list and General, Facets, Attributes, and Properties sections appear.
  5. (Optional) Change the default name to a unique, descriptive name in the Display Name field of the General section.
  6. (Optional) Enter a description.
  7. Enter the component type.
  8. Click Browse. The Select Type dialog box appears.
  9. In Select entries, enter the first letter of the type you want to use. A list of available types beginning with the letter you entered appears in the Matching Types list.
  10. Select the type that you want to use and click OK.
  11. Click Add in the Facets section.
  12. Type a facet name, display name, and description, and click Finish.
  13. Click Add in the Attributes section.
  14. Type a unique, descriptive name in the Attribute Name field.
  15. Click Browse.
  16. In Select entries, enter the first letter of the type you want to use. A list of available types beginning with the letter you entered appears in the Matching Types list.
  17. Select the type that you want to use and click OK.
  18. Type a value in the Default Value field.
  19. (Optional) Type a value in the Suggested Value field.
  20. Click Add in the Properties section.
  21. Type a unique, descriptive name in the Property Name field.
  22. Click Browse.
  23. In Select entries, enter the first letter of the type you want to use. A list of available types beginning with the letter you entered appears in the Matching Types list.
  24. Select the type that you want to use and click OK.
  25. Type a value in the Default Value field.
  26. (Optional) Type a value in the Suggested Value field.
Related concepts
JSF Application Configuration Editor
JavaServer Faces
Configuring the faces-config xml File
Related tasks
Adding a RenderKit to a Web Application
Adding a Converter to a Web Application
Adding a Validator to a Web Application
Adding an Action Listener to a Web Application
Adding a Default RenderKit ID to a Web Application
Adding Locale Configuration to a Web Application
Adding a Message Bundle to a Web Application
Adding a Navigation Handler to a Web Application
Adding a Property Resolver to a Web Application
Adding a State Manager to a Web Application
Adding a Variable Resolver to a Web Application
Adding a View Handler to a Web Application
Adding an Application Factory to a Web Application
Adding a Faces Context Factory to a Web Application
Adding a Lifecycle Factory to a Web Application
Adding a RenderKit Factory to a Web Application
Adding a Phase Listener to a Web Application

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.