Overriding The JSF Renderers (The simple example)
转载自:http://www.jroller.com/HazemBlog/entry/overriding_the_jsf_renderers_the
Some guys have asked me how to override the JSF component renderers.
Actually that operation is very easy to do, You will just have to do the following:
1. Create the Renderer class.
2. Register the Renderer class in the faces-config.xml.
Here in the example I will make the simple scenario. It is how to extend the JSF Label component (Assume that you want to make your JSF labels start with *).
Following the described steps above
1. Create the Renderer class :
2. Register the Renderer class in the faces-config.xml.
3. Write the test JSP page.
4. This is the output.
Here is a link suggested by my nice friend Mert to see the other JSF renderers classes to override Classes of Renderers