Combining Multiple Queries and Parameters into One Operation

This question came up twice this week and while the solution is explained in a couple of previous blog entries I did, I thought that showing off the complete solution in a single video would be nice.

The scenario is that you have two VOs with queries that are based on a parameter, I showed in the past how to create a parameter form that executes the query - and you can do this for both.
But what if you actually need just one value to drive both queries? How do you combine two parameter forms and two buttons into one?

This is what this video shows you. The steps are:
Creating two parameter forms
Setting the value of a parameter in the binding tab
Creating a backing bean to execute the code for one button
Adding the code to execute another operation
Remarking the parts that can be dropped from the screen

Check it out here:

Comments:

Thanks for this great post, Shay.

Posted by Barbara Gelabert on December 29, 2010 at 03:07 AM PST #

It's really awesome thank you , I just want to know one more thing , what we should do when we have more than 1 query on the same table , in my case I want to apply 4 different query on the same table .
please advise

Posted by guest on May 04, 2012 at 10:42 AM PDT #

guest, you can have a VO service method that dynamically adds one of 4 view criterias to your VO definition. Or maybe uses the setWhereClause method of the VO.
Something like:
https://blogs.oracle.com/shay/entry/passing_parameters_to_an_adf_p
or
https://blogs.oracle.com/shay/entry/am_service_method_-_simple_dem

Posted by Shay on May 04, 2012 at 12:34 PM PDT #

Thanks Shay its really solved my problems

Posted by guest on May 18, 2012 at 04:48 AM PDT #

thanks for this post Shay,
one question :
is it possible to do same thing without parameter form?
i want to do it for four(4) queries, with same parameter , and that parameter can be in combobox...

Posted by guest on March 10, 2014 at 05:09 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
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