This blog is concerned with the ADF/BPM technology provided by Oracle. I Hope this blog helps fellow Oracle ADF/BPM Developers

Sunday, November 8, 2009

Getting the Value from a SelectOneChoice List (Not Index)

One of the Issue I found when I use af:selectOneChoice component that when I want to get the selected value from one of the selectOneChoice attribute from backingbean I found the return value is the index of selected value not the value. (Using HR Schema)assume we have an EmployeesView which has a DepartmentId (as a lookup to DepartmentView) and want to get the the value of selected Department. To solve this problem do this :

I am using ur code and try to get the selected value. But it always returns the very first value of my selectOneChoice list, cant able to get the selected value.

When I print the listBinding value it also always print 0!!!!!. Can you please let me know what is that deptmentID which ur using. I am using the Decode which i drag and drop from my Application ModuleDC

I believe binding.get("Decode"); is wrong in my case. Since I drag and drop the Decode from my Application Module DC using that one to get. B ut seems that is not in the list. How can I see all the list in the binding.

Or how can get the correct attribute name of my selectOneChoice from my page?