How Oracle ADF Checkboxes Work (af:selectBooleanCheckbox)

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:\Users\Monika\Desktop\How 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:\Users\Monika\Desktop\How 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:\Users\Monika\Desktop\How 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


Teodor Ognianov

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.

More Posts - Website

Follow Me:
LinkedInGoogle PlusReddit

Do you want more great blogs like this?

Subscribe for Dreamix Blog now!