Hi,
I have a Drop Down where the Code is
<h:selectOneMenu styleClass="alignRight" id="myDropDown"
value="#{myBean.yCode}"
onchange="submitPageX();"
title="select any one in this menu">
<f:selectItems value="#{yCodeList}"/>
</h:selectOneMenu>
It is rendered properly and I can see the value in my backing bean when the Drop Down value changes.
Currently the Values in the Drop Down is in the same order as they are in the List which is populated in the Backing Bean. The Drop Down Component is common for all pages and is like a Header for all the pages.
My question is if I have 3 Values in the Drop Down and the User selects the 2nd Option is there a way to keep the Order of the Drop Down Values same but have the 2nd Option Selected in the Drop Down.
So until the User changes the Drop Down Values himself the Value selected by User is displayed as the selected Value.
e.g.
Jack Displayed Currently
John
Sarah
Now User select 2nd Option.
Jack
John Now in the subsequent pages JOHN should appear in the drop down by default but and the order of drop down remains same.
Sarah
One way to do is to alter the Order of the list and then by default the first option is shown in the Drop Down, but I dont want to alter the List order.
Thanks in Advance