Wednesday May 23, 2012

Adding LOV to non-database Field or Parameters

More and more people end up using ADF for applications that don't actually talk to a database backend but rather to Web services, Java classes, and SOA process instead. In these cases the ADF pages actually end up invoking methods and passing parameters to these methods. One question I got today was "how do I add a database driven LOV to such a parameter?".

The tricky part is that the LOV component - af:inputListOfValues - expects a specific data model to be able to show the advance searching the LOV offers. As a lazy developer I don't feel like creating a managed bean with this model and populating it manually from the database. Instead here is a little video that shows a no-coding possible solution.

I'm using ADF BC to get the LOV and data from the database. I then use a bit of binding trickery to eliminate the need for a managed bean with the model structure for the LOV. I associate the LOV model created for an ADF BC field with an LOV field that is mapped to the parameter being passed to the method.

Thursday Aug 25, 2011

Finding a code by typing the description and autosuggest

A while back I created a blog/demo that showed how easy it is to get the translation of a code field to show up in ADF forms by using a join based VO on two entities and partial trigger on the code field.

I got an interesting question on the comments for that entry that asked whether I can do the reverse and allow the user to type the description of a field and get the code based on the description. Well it turns out that is not that complex either. Throw in the ease of implementing auto-suggest behavior with ADF BC and ADF Faces and you got a very nice solution for that question.

See here:

Monday Jan 24, 2011

Dependent LOVs in an af:query component

I showed before how simple it is to create a dependent or cascading LOV using ADF BC.
This will allow you to filter one list based on the selection in another list.
However, if you'll try to get this to work inside an af:query component - it won't work out of the box.
Luckily Steve Muench pointed me to a small setting that will get it to work in an af:query component.
Basically all you need to do is set the autosubmit property of the attribute in the viewObject.

Here is a short demo showing you how to do this. (it starts where the previous video ends).


Friday Jan 07, 2011

Adding an LOV to a query parameter (executeWithParams)

I showed in the past how you can use the executeWithParams operation to build your own query page to filter a view object to show specific rows.
I also showed how you can make the parameter fields display as drop down lists of values (selectOneChoice).

However this week someone asked me if you can have those parameter fields use the advanced LOV component.
Well if you just try and drag the parameter over, you'll see that the LOV option is not there as a drop option.
But with a little bit of hacking around you can achieve this. (without actual Java coding).
Here is a quick demo:

Thursday Oct 21, 2010

Got to Love Cascading LOVs in ADF

"You've got to love our cascading LOVs" was the title of an email from Maiko that pointed to a long and complex tutorial that shows how non-trivial implementing cascading lists is when you use ExtJS, Hibernate and Spring. You basically end up writing over 300 lines of code in a mixture of languages including java, javascript and json.

This is indeed one of many areas where you can clearly see the advantages that ADF gives you with a declarative development approach.
Check out this little demo that shows how you build this type of cascading lists with JDeveloper and ADF. The interesting point to note is that a single SQL statement is the only manual line of code you end up writing.

This is why we believe that visual and declarative is good.

By the way, if you prefer written instructions for this, you can use either Steve's Article or this part of the ADF BC tutorial.

Friday Dec 04, 2009

ADF Query with Parameters and List of Values - Part II

In the previous blog entry I showed how to do a search page using the execute with parameters operation. This entry is a little more up-to-date and uses the new view criteria and query components that have been added in JDeveloper 11g.
One nice aspect here is that it also lets you change the UI component for the parameters to be input with list of values.

Here is the demo:

About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today