Skip to main content

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 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:)


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


Awesome post. Hard thing to do without an example thanks for this.
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, is created for Employee LOV. If we have 'n' number of LOVs then do we need to create 'n' number of classes. If so, how to genaranalize the and
rojicp said…
Excellent post...i like the POJO workouts, this have more freedom for developers

Popular posts from this blog

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…