Dive into Oracle ADF

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:13:15 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

May 2004
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Apr   Jun

Get Firefox!

Wednesday, May 19, 2004

My sister Michelle turns 30 today. Happy Birthday! She has the strenuous yet fun job of working for the adventure tour company Backroads as a guide on biking and hiking tours. As luck would have it, she had a break for one week in her schedule -- she leads tours around Tuscany as well as other areas of the world like Patagonia, Costa Rica, and Wyoming -- to come help coordinate my daughter's birthday party that we had yesterday. So we'll be celebrating her birthday tonight with a dinner at a nice, local restaurant (and I'll be meeting up with them after my usual raft of conference calls with folks on the JDeveloper team that I work with in the US).


4:47:44 PM    



In my BC4J/JClient Performance Study whitepaper on OTN, one of the tips I suggest at the end is to "Keep an Eye Out for Lazy Master/Detail Coordination Opportunities":

More sophisticated user interfaces might make use of Swing's tabs or card layouts to have a set of panels which are conditionally displayed (or displayed only when the user brings them to the foreground). While not automatic in the 9.0.3 release, BC4J does offer API's like setMasterRowSetIterator and removeMasterRowSetIterator on any RowSet which allow you to dynamically add and remove iterators from the list of ones that will cause that rowset to be actively coordinated by the framework. Using these API's in a clever way (where possible, from within a server-side AM custom method of course!) you can have you application automatically coordinate the detail queries for regions on the screen that the user can see, and suppress the active coordindation for data that the user cannot currently see on the screen.

A buddy Angelo who is always on the road helping out ISV's and partners use Oracle technologies to the maximum called me today asking whether I had an example lying around that illustrates how you might put this suggestion into practice. I said, "You bet!", and copied my sample application (DeferredViewLinksForNonVisiblePanels.zip) to a place where you can download it.

The key steps to try it out would be:

  1. Make sure you have a connection named "scott" defined for the SCOTT account
  2. Add the *.jpr file to a convenient workspace
  3. Run the FormTestModule.java Swing client form.
  4. Tick the "Keep Direct Reports Display Synchronized?" checkbox to have the second-level detail view object stay (or not stay) synchronized with the current employee selected in the Employees table. (Hint: An employee like KING has some direct reports!).

Look in the FormTestModule.java class for the comment that says "Added this code", and look at the jCheckBox1_actionPerformed method to see what code is executed when the user checks or unchecks the checkbox. It calls the enableDirectReportsViewLink exported custom method on the TestModule custom interface for my application module, which encapsulates the few lines of code necessary to conditionally work with the two API's discussed in the suggestion above to "enable" or "disable" the automatic coordination of detail view object instance.


4:25:05 PM    


© Copyright 2008 Steve Muench.