• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in JSF

 
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

I am facing problem with f:selectItems tag. the following is the code
i am using to display the values.

<h:selectOneMenu id="dgt_ispn"
value="#{digitManipulation.dgtIspn}">
<f:selectItems id="dgt_ispn_list"
value="#{digitManipulation.dgtIspnList}"/>
</h:selectOneMenu>

Each value is displayes two times. Please help me.

I am setting the values in the bean like this :

public void setDgtIspnList(ArrayList list){
this.dgtIspnList = list;
}
public ArrayList getDgtIspnList(){
dgtIspnList.add(new SelectItem("YES"));
dgtIspnList.add(new SelectItem("NO"));
return this.dgtIspnList;
}
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where did you define dgtIspnList?

Looking add your code I get the idea that by every call the the method
getDgtIspnList() the selectItems are added to the dgtIspnList?
 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic