logo
Home Tutorial

How To Create Your Own JSF Components



  • Simulate a rendered result before implement it. Use any HTML editor with a preview option to see how the HTML you are going to produce works buy itself. If some HTML construction doesn’t work for you, you save time seeing the problem before you start to implement the component that produces the unsatisfactory HTML code.
  • Localize the JavaScript functions. If the rendered code contains JavaScript, be sure this JavaScript code doesn’t collide with JavaScript coding in other components that will work on the same page.
  • Test how your component works together with other JSF Components. Check the situation where your components insert other components or are themselves inserted as children for other components.
  • Check how the rendered code works in the different browser. Avoid browser-specific tags or attributes.
  • Keep rendering functionality as simple as possible. Never put the bussness logic into the rendering functions.

See Also:

Guidelines for Designing Reusable Custom Components Using JavaServer Faces Technology


This article gives you some basic guidelines for designing
custom components using ChartComponent as an example.


Creating JSF Custom Components by Bill Dudney


This article illustrates how to build custom components for use
in web applications based on JavaServer Faces (JSF).