• Post Reply Bookmark Topic Watch Topic
  • New Topic

To the authors: Dynamically add components

 
Susanne Jarl
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if your book cover how to dynamically add components in a backing bean? For example how to add columns to a datatable and how to set attributes for each column like width, title, mouseevents etc? Does it cover myfaces components?

Regards,
Susanne Jarl
Software developer
Sweden
 
Chris Schalk
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of the examples I put in the book don't necessarily create component dynamically i.e..purely in a backing bean. Typically what I've seen done - and what we do in the book is to have all the components declared on the page and bound to like UI components in a backing bean. A component could have its rendered attribute be initially set to false and you could then have code to toggle the rendered attribute to true in an actionlistener method.
Techniques for doing this are shown in Chap 8 (event model) and 9 (sample app).

-Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!