cancel
Showing results for 
Search instead for 
Did you mean: 

a:imagePickerRadio and its Image List from a Java LIST

amanjure
Champ in-the-making
Champ in-the-making
Hello all.

I wanted to use the <a:imagePickerRadio /> tag. But my list of image that shows up in this radio list is dynamic and comes from my beans List property. How can I implement it in my JSF (and bean for that matter).

I see that <a:listItems> does not have a property called image which I want to use.

thanks in advance!
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
The <a:listItems> tag is just a wrapper around a list of UIListItem objects (themselves JSF components). So there are 2 ways you can supply the images to choose from. You can either have individual <a:listItem> tags or you can have a single <a:listItems> tag and retrieve the images from a bean.

So, for your scenario you need to implement exactly what the CreateSpaceWizard does, have a look at /jsp/spaces/create-space-wizard/details.jsp, this has an example of using <a:listItems>. You'll notice the value binding expression is looking for a method called getIcons() on the bean representing the wizard. In this case it's CreateSpaceWizard. Have a look at the getIcons() method for an example of how to build the list required.

Hope that helps.