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:20:08 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

June 2006
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  
May   Jul

Get Firefox!

Thursday, June 22, 2006

I've added example number 70 to my examples page to illustrate a technique for doing conditional defaulting from the view/controller layer in a JSF/ADFBC application.

Generally we advise putting business logic like attribute default values into on overridden create() method of your Entity Object as described in section 9.4.1 "Defaulting Values for New Rows at Create Time" of the ADF Developer's Guide for Forms/4GL Developers. Section 9.10, "How to Store Information About the Current User Session" explains how a custom application module method can save data into the per-user session "user data" hashtable, which entity object business logic like create()-time defaulting can then reference. However this example contains a Create.jspx page with a Create.java backing bean that illustrates a case of controller-layer logic that conditionally returns a default value for the "Loc" binding based on controller-layer flags like the presence of a #{requestScope.creating} attribute, and on the value of a #{sessionScope.locDefaultValue} attribute. The #{requestScope.creating} flag is set declaratively using an <af:setActionListener> on the (Create) button in the Browse.jspx page. The example works by using a backing bean property to "decorate" the normal Loc attribute binding. If certain conditions are true, then the getLoc() method in the backing bean returns the value of the session variable instead of returning the normal value of the Loc binding. Try setting the session value to some value, then experiment with clicking on the different buttons in the browse page to show the defaulting occurring or not occurring as inidicated on the button labels.

 


4:48:07 PM    



The July/August 2006 issue of Oracle Magazine is out, and along with it the latest installment of my Developer Frameworks column: "A New Face on the Block: Oracle ADF offers new JSF support and enhanced, visual, declarative development."

You can find a list of all of my past columns here.


11:43:40 AM    


Nilesh Jethwa has been blogging about Oracle Applications Business Intelligence for a few months now over at http://www.appsbi.com/  Worth a peek if BI piques your interest...


10:55:55 AM    


© Copyright 2008 Steve Muench.