How To Add an Extra Choice for a Null value in a Databound messageChoice Component
Last updated on AUGUST 04, 2016
Applies to:Oracle JDeveloper - Version: 10.1.2.0.0
Information in this document applies to any platform.
You have created a UIX application that includes a messageChoice (drop down list) component, as explained in document "How To use the List Binding Editor with ADF UIX" on OTN.
For example, a list of the Departments that can employ an Employee:
The list works fine, but your data model allows to nullify the value.
When you don't have the list, you can just nullify the value in the field.
But how to do it when you have a list?
There doesn't seem to be an extra option to specify that the messageChoice should also include the Null value.
If you have some JSP experience, you know you can add an extra HTML:OPTION to the HTML:SELECT tag:
But as result, you get "No Department" repeated in the list as many times as you have entries in the list:
Figure 1 - List with "No Department" repeated many times.
Is there a way to add an extra value (Null) in the messageChoice component?
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