How To Get the Real Value of the Selected Element in a SelectOneChoice Component ?

(Doc ID 1252674.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle JDeveloper - Version and later
Information in this document applies to any platform.
***Checked for relevance on 22-Aug-2013***


You are developing an ADF Faces/BC application in JDeveloper 10.1.3

One of your pages includes an af:selectOneChoice component.
You need to get access to the real value of the element that was selected from the list.
Unfortunately, the ADF List bindings (f.ex. #{bindings.<yourList>.inputValue}) returns the index number
which reflects the position of the selected item on the list - not the value of that selection as you might

You read in the documentation that you can use the Valuepassthru set to true for that purpose, as
explained in the documentation of the af:selectOneChoice component:

... whether or not the values are passed through to the client. When valuePassThru is false the value and the options' values are converted to indexes before being sent to the client. Therefore, when valuePassThru is false, there is no need to write your own converter when you are using custom Objects as your values and/or options.

The page seems to work correctly at first, even when selecting a different value from the SelectOneChoice
component.  However, at the third attempt to change the item on SelectOneChoice component, your web
application hangs, without displaying any error message in the page or in the Logs.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms