• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding JSF components and binding them at Runtime  RSS feed

 
Lakshmi Rath
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement of creating a JSF page which should have components dynamically created on satisfying some pre-conditions.

ALso after creating the components I need to bind them for further processing.

Any pointers to the above would be very helpful.

Thanks in advance.

regards,
Lakshmi
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can create a jsf form that has all the components and then use the "rendered" property to determine whether to display a particular component or not.

Ex:



In my User Backing Bean, I have declared a boolean called receivedVisible and have added getters and setters to it.

I initialize this boolean in the constructor of my backing bean,

ie.,



Hope this helps.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!