Hi, i am new to JSF. I am facing a problem in displaying the last selected value in the dropdown.
On selecting any value in the dropdown, i need to display the details of the selected item on the same page in textfields. I am doing this with valuechangelistener. but when i return back from the listener, The text field are filled with the new values but i get an empty dropdown box. so i re-populated the dropdown in the same listener. Now, due to repopulation, i cannot get the last selected value in the dropdown.
i also tried to set the selected value in the listener through setSelctedId() where selectedId binds to my value attribute of selectOneMenu, which works, but its takes it as another value change for that dropdown and calls the listener again on the next submit of the form.\
i created a component for that dropdown in backbean and made a binding for it in th page. Also, i removed the value="myBean.selectedId" form the dropdown as i am get teh selected value in the listener using even.hetNewValue().
Hi Could you please explain how to do? I am also facing similar problem. I have exaplined here. When the page refreshes to display the list, I am not able to get the selected value from the list. here Thanks.
Thanks tiny ad, for helping me escape the terrible comfort of this chair.