Programmatically Generated ComboboxLOV (without using ADF Model)

While working with different teams, noticed that there are teams(not many) who want to use af:inputComboboxListOfValues without using ADF model. If you have such use cases, then this post is for you.

This post contains a sample for programmatically populated af:inputComboboxListOfValues component, without using ADF model. In fact the core pieces used in this example are copied from ADF Faces demo source. This sample is useful if you use ADF Faces without ADF model(binding layer) and still want to implement ComboboxLOV. The following diagram( Also see similar discussion in Oracle® Fusion Middleware Web User Interface Developer's Guide ) illustrates ListOfValuesModelthe model class used by the LOV component. In this diagram, you can also see it's association with the QueryModel and TableModel classes, which are used by the LOV UI component.


Take a look at the ListOfValuesModelImpl.java in the attached sample to get a feel of the implementation. This class creates LOV for displaying list of employees. To keep it simple, I'm not generalizing the implementation. I hope customization of this example is not that difficult:)

Download 

You can download the sample workspace from here.
[Runs with Oracle JDeveloper 11g R2 11.1.2.3.0]

Comments

Awesome post. Hard thing to do without an example thanks for this.
THANKS FOR VALUABLE INFO, BUT I JUST WANT TO KNOW MORE ABOUT SUCH SCENARIO WHERE WE NEED TO IMPLEMENT LOV PRO-GRAMMATICALLY ?
Stuart Moore said…
Thanks for the post. However, any ideas why the table data in the popup won't sort when the sort icons are clicked? Can't see why this won't work, but it does in the ADF Demo code.
Sivakumar Ch said…
Thanks for the useful post. In the given example, EmpRowData.java is created for Employee LOV. If we have 'n' number of LOVs then do we need to create 'n' number of xxxRowData.java classes. If so, how to genaranalize the ListOfValuesModelImpl.java and DemoComboboxLOVBean.java.
rojicp said…
Excellent post...i like the POJO workouts, this have more freedom for developers

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.