Nonobvious Config Error in JSF Beta to 1.0 converstion
I just finished updating all the code for Mastering JavaServer Faces. Apart from the camelCase that I posted about already there were not very many changes to the code.
The custom component chapter though had one gotcha. Since I had a component I had to register that in the faces-config.xml file like this
<component> <component-type>Scroller</component-type> <component-class>calendar.component.UIScroller</component-class> </component> <render-kit> <renderer> <renderer-type>ScrollerRenderer</renderer-type> <renderer-class>calendar.renderer.ScrollerRenderer</renderer-class> </renderer> </render-kit>
I was getting errors like this;
I found this thread that discussed some other occurrences of similar errors but I'd already been bitten by the old versions of the jars and fixed that in early chapters. Anyway turns out I'm missing the component-family element from my renderer declaration in the faces-config.xml.
<component> <component-type>Scroller</component-type> <component-class>calendar.component.UIScroller</component-class> </component> <render-kit> <renderer> <component-family<Scroller</component-family> <renderer-type>ScrollerRenderer</renderer-type> <renderer-class>calendar.renderer.ScrollerRenderer</renderer-class> </renderer> </render-kit>
Adding the componet-family did the trick!

