Showing posts with label select one choice. Show all posts
Showing posts with label select one choice. Show all posts

Wednesday, November 7, 2012

Building Select Choice with an ArrayList


This blog is about building a select once choice using an ArrayList.
 In few scenarios , we have to show the list of values returned by a web service , this solution can be used  for such cases.


1)Create a bean with an arraylist and code to populate this arraylist.



2)By default , While dropping a select one choice  f:selectItems is created and it's value points to ListBinding.
For our use case  , we will replace   f:selectItems  with  af:forEach and map it's value to appropriate arraylist.






3)Run the page.