The repeated question on OTN is how to get the code or value of the selected item from SelectOneChoice. One of my post explains how we can achieve this using variable iterators in page definition. Here is the link for the post : http://rohanwalia.blogspot.sg/2013/09/retrieve-selected-value-from.html
Using the technique described in the above mentioned approach, we get hold of the id or value when we select the item from select one choice and we can use it on the page.
But the problem comes when this value is needed in a method of managed bean using ValueChange Listener . One scenario for this is that the code of selected item is required as an input to call a method exposed by ApplicationModule.
So our use case will be to get EmployeeId of selected Employee from LOV into valueChangeListener.
To start with lets quickly create a sample application. Used HR schema and created one jspx page selectOneChoice.jspx .
Go to the binding and create a new variable inside variable iterator.
Using the technique described in the above mentioned approach, we get hold of the id or value when we select the item from select one choice and we can use it on the page.
But the problem comes when this value is needed in a method of managed bean using ValueChange Listener . One scenario for this is that the code of selected item is required as an input to call a method exposed by ApplicationModule.
So our use case will be to get EmployeeId of selected Employee from LOV into valueChangeListener.
To start with lets quickly create a sample application. Used HR schema and created one jspx page selectOneChoice.jspx .
Go to the binding and create a new variable inside variable iterator.