aspose file tools*
The moose likes JSF and the fly likes Create dynamic composite component using custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Create dynamic composite component using custom tag" Watch "Create dynamic composite component using custom tag" New topic
Author

Create dynamic composite component using custom tag

Ghazi Jamal
Greenhorn

Joined: Sep 07, 2011
Posts: 8

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

Joined: May 26, 2011
Posts: 13

try to use <ui:repeat> tag in your component and create additional attribute for it that will hold the count.
Ghazi Jamal
Greenhorn

Joined: Sep 07, 2011
Posts: 8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create dynamic composite component using custom tag
 
Similar Threads
dealing with jsf components in java script
simple jsf form
Passing parameters with h: link
Add dynamic component to panelgrid with existing component
Duplicate Component ID found in view