Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

my component - my renderer

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

I'm writing my first component, and something with the component renderer relation doesn't work. I use JSF with facelets and started at the taglib.xml with


Thereafter I added the faces-config.xml with the component and the renderer in the renderer-kit



IMHO that should be enough to connect a component to the appropriate renderer. In the server log I found this during serverstartup:


Now the problem, when I try to render my Rect the following error is shown in the server log:


As you see, the render-type is wrong. Does anybody have some sugestion how to connect the component with the renderer.

Greetings
Eric
 
Saloon Keeper
Posts: 25821
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the component renders itself, the renderer-type defined in the component should be null. The stock HTML renderer types are tied to specific HTML elements and JSF decided that you're planning on rendering an HTML input text box element.

I'm surprised you got what you did, though, since Facelets puts its own spin on custom tags and their rendering. Which, alas, I've not seen clearly explained.
 
Eric Härtel
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The component should not render itself. There is a component class Rect holding height and width and all that stuff, and there is a class RectRenderer.
 
Eric Härtel
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is solved. The component class was derived from UIOutput, which returns always renderer type Text.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic