Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create dynamic composite component using custom tag

 
Ghazi Jamal
Greenhorn
Posts: 8
Hibernate Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i'm new in JSF. My need is to render dynamic component (that i don't know how many they are at first). I want to do this through a custom component wich will create and render them according to some parameters.

so in my page entry i will have :

and the result would be for instance, multiple inputTexts (mapped to a hashMap of properties) and outputlabels as if i do it through jsf standard components :


is there any good idea to make my custom component ?

Thank you for help or..intention to help

 
Maks Besida
Greenhorn
Posts: 13
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to use <ui:repeat> tag in your component and create additional attribute for it that will hold the count.
 
Ghazi Jamal
Greenhorn
Posts: 8
Hibernate Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maks Besida wrote:try to use <ui:repeat> tag in your component and create additional attribute for it that will hold the count.

Thank you, yes that is what i have done (using facelts tag lib with a c:foreach iterator)
i can say that's resolved now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic