Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add a new renderer?  RSS feed

 
Bryan Basham
author
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Never mind... I found my typo in the <render-class> element.

I have followed several on-line tutorials and books (Core JSF) but I still have not been able to add a new renderer.

Here's my scenario: I am trying to build new type of HTML form component. I was following instructional path from Chapter 9 of _Core JSF_ (by Geary & Horstmann) so I started with the FormContainerTag (extends UIComponentTag) and FormContainer (extends HtmlForm) classes. The FormContainer class implements direct encoding (by putting the HTML rendering in the encodeBegin and encodeEnd methods).

At this stage my faces-config file included this component declaration:


This stage of the instruction worked fine for me. My problem today occurs when I try the next stage of the instructions. This stage has you delegate the HTML creation to a renderer class. So, I created the FormContainerRenderer class (extends HtmlFormRendererBase) and moved the HTML rendering code into this new class.

For this stage I had to modify the faces-config file:


Now when I try to use this component, a response is generated (no server exceptions) but there is no HTML being rendered for the <formContainer> tag.

Do you see anything obviously wrong?

Sincere thanks,
Bryan
[ May 07, 2007: Message edited by: Bryan Basham ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!