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

Search blog with Google:
 

Search BC4J JavaDoc:
 

March 2005
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    
Feb   Apr

Get Firefox!

Thursday, March 17, 2005

A user asks an interesting question on the OTN forum about how to bind attributes that are added at runtime to a view object using the addDynamicAttribute() API. I've added example #29 (Creating a Dynamic Attribute Binding for a Dynamic View Object Attribute) to my not yet documented ADF examples page to illustrate how to do it.

This small sample illustrates how to create an attribute control binding at runtime for your dynamically created View Object attribute. The TestPage illustrates a JSTL-based read-only table, based on having dropped a "Read-Only Dynamic Table" from the data control palette. The dynamic table binding figures out its attributes at runtime, so it picks up the "Foo" attribute that is added by the addDynamicAttribute("Foo") call in the DeptViewImpl.java file's create() method. The TestPageAction class in the ViewController project illustrates how to programmatically add an attribute binding for the dynamic "Foo" attribute if it's not already there. The TestPage.jsp uses this binding to allow the user to enter a value for Foo for any row in the Dept table. 


1:21:01 AM    



© Copyright 2008 Steve Muench.