On 2/15/2010 12:55 AM, Krishna K. Pandit wrote:
Can any one tell me how to create<t:selectItems>   in backing bean.

We simply generate a List of SelectItem in our backing beans, and then put that list onto our facelet page:

backing bean:

    List<SelectItem> selectionItems = new ArrayList<SelectItem>();

    for (some iteration of a group) {
        selectionItems.add(new SelectItem(option_string,        
           value_string));
    }

facelet:

   <h:selectOneMenu required="true">
      <f:selectItem itemValue="" itemLabel="-- select --" />
      <f:selectItems value="#{bean.selectionItems}" />
   </h:selectOneMenu>

--
Guy Rouillier

Reply via email to