• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to add a new renderer?

 
author
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Your buns are mine! But you can have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic