How Oracle ADF Checkboxes Work (af:selectBooleanCheckbox)

Are you absolutely sure how af:selectBooleanCheckbox in ADF works? I’m not.   Every time when I need to use a value from af:selectBooleanCheckbox I need to recall in which situation what value will be returned. Here you can find a short example of different returned values depending the binding Items getting values calls. If we add […]

by Teodor Ognianov

February 16, 2016

1 min read

14227 1028722510490366 6701560462677517638 n - How Oracle ADF Checkboxes Work (af:selectBooleanCheckbox)

Are you absolutely sure how af:selectBooleanCheckbox in ADF works? I’m not.

 

How ADF Checkboxes Work (af_selectBooleanCheckbox) 1

Every time when I need to use a value from af:selectBooleanCheckbox I need to recall in which situation what value will be returned.

Here you can find a short example of different returned values depending the binding Items getting values calls. If we add some different values for the checkbox in page definition file, we can be absolutely sure that the behavior is not predictable for a regular developer.

C:UsersMonikaDesktopHow ADF Checkboxes Work (af_selectBooleanCheckbox) 2.png

For the experiment I will try to print the different values for one select boolean checkbox in different ways – ValueChangeEvent, EL Expression, Binding and Model values:

C:UsersMonikaDesktopHow ADF Checkboxes Work (af_selectBooleanCheckbox) 3.png

How ADF Checkboxes Work (af_selectBooleanCheckbox) 4

How ADF Checkboxes Work (af_selectBooleanCheckbox) 5

As you can see all conventional ways to get the value from the Bean are limited to the Boolean value of the component. The only way I know to get the logical value of the component is to get it from the View Object.

C:UsersMonikaDesktopHow ADF Checkboxes Work (af_selectBooleanCheckbox) 6.png

Be careful using af:selectBooleanCheckbox and be happy if you can skip it.

The next hidden treasure is about the default value of the check boxes. So,

Stay tuned #dreamixblog

 

Qualified IT professional focused on software development having rich background with Oracle technologies. Deep knowledge in Business Intelligence, It project management. Familiar with broad set of Java EE frameworks, including Oracle ADF, database servers as Oracle Database (9i, 10g, 11g), Database Replications, Heterogeneous Service. Teodor is a team player with good coaching skills, providing assistance with patience and deep understanding of knowledge sharing. Responsible and highly motivated.