Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

h:selectOneMenu problem  RSS feed

 
taraka ninu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have a problem with <h:selectOneMenu> component.
By default its not setting current value for corresponding row. Its just listing all values and defalut is first value in the list.

Am using this inside datatable. Please let me know the solution.

Thanks
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show some code
 
taraka ninu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey varun,

see the following code in JSP,

<h ataTable id="menuData"
value="#{ClassA.compositeList}"
............
............

<h:selectOneMenu id="parentMenuItem"
value="50"
valueChangeListener="#{ClassA.setMethod1}"
onchange="this.form.submit();">
<f:selectItems value="#{ClassA.parentMenuList}" />
</h:selectOneMenu>

</h ataTable>

here for debugging am just hardcoding value=50 for the list. but by default first value of list is displaying.

Thanks
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show the rendered source code too
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!