File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes custom renderer problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "custom renderer problem" Watch "custom renderer problem" New topic

custom renderer problem

Jorge Fiallega

Joined: May 27, 2005
Posts: 12
I am trying to create a component, a renderer and a tag for such a component.

I am having troubles connecting the renderer. In the getRendererType() method of the UIComponentTag if I return null everything works fine although ofcourse my renderer is not used. Now if I return the renderer type specified in <renderer-type> of the faces-config then I get a NullPointerException.
java.lang.NullPointerException at javax.faces.component.UIComponentBase.encodeBegin(
at javax.faces.webapp.UIComponentTag.encodeBegin(
at javax.faces.webapp.UIComponentTag.doStartTag(
at org.apache.jsp._test._jspService(

Any ideas?

Jorge Fiallega

Joined: May 27, 2005
Posts: 12
OK, I found the problem. I need the method getFamily() in the component.

I agree. Here's the link:
subject: custom renderer problem
Similar Threads
Classcast Exception
JSF: component-family, component type and renderer relation.
Extending Standard Components
jsf tutorial
How can I customized the trinidad render class?