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

Search blog with Google:
 

Search BC4J JavaDoc:
 

February 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        
Jan   Mar

Get Firefox!

Wednesday, February 15, 2006

I've added a new screencast to my screencasts page to illustrate the steps involved in Creating a Drop-Down List Based on a View Object with a Named Bind Variable.

As illustrated in the screencast, the crux of the technique -- after creating a view object that accepts a named bind parameter (e.g. :CurrentEmpno) is to:

  • In the binding section of the page definition, add an action binding for the "ExecuteWithParams" built-in action for the iterator driving the set of choices in the list.
  • In the action binding editor, provide an EL expression that you want to supply the value of the CurrentEmpno named bind variable. In the screencast, we use the EL picker to select the expression ${bindings.Empno.inputValue} which represents the value of the Empno attribute in the current row.
  • In the executables section of the page definition, add an "invokeAction" after the iterator for the main EmpView but before the iterator for the list, and binding the invokeAction to the "ExecuteWithParams" binding we created above. This forces the query on which the drop-down list is based to be re-executed each time the page is rendered, taking into account the current row's empno value as the value of the named bind variable in the view object driving the list.

Using this new threesome of:

  1. ViewObject with named bind parameters
  2. Action binding for ExecuteWithParams against an iterator for that view object, and
  3. InvokeAction in the executables section to automatically invoke an action binding during the JSF page lifecycle

many things that required writing code in JDeveloper 10.1.2 can now be done declaratively in the 10.1.3 release.


11:26:08 AM    



© Copyright 2008 Steve Muench.