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

Search blog with Google:
 

Search BC4J JavaDoc:
 

August 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        
Jul   Sep

Get Firefox!

Wednesday, August 25, 2004

Connie writes in to ask, "How can I programmatically access the currently selected value of a list binding?"

The trick is to understand that the return value of the getSelectedValue() method returns a Row interface giving you the Row of attributes from the list iterator for the currently selected row. Assuming you had a list binding named Mgr and wanted to get the value of the ManagerName attribute from the currently selected row in its list iterator, you'd write code in your data action like this:

JUCtrlListBinding b = (JUCtrlListBinding)ctx.getBindingContainer().findCtrlBinding("Mgr");
Row selectedRow = (Row)b.getSelectedValue();
String name = (String)selectedRow.getAttribute("ManagerName");

9:48:51 AM    



© Copyright 2008 Steve Muench.