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

Search blog with Google:
 

Search BC4J JavaDoc:
 

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

Get Firefox!

Thursday, August 03, 2006

I've posted example #77 to illustrate how you might leverage the power of Oracle's SQL XML support to easily query the interesting data from within an XML document using a view object. The DepartmentDataFromXML view object in the example uses a query that looks like this (NOTE: xmltext is a named bind variable):

select 
  to_number(extractValue(value(x),'/ROW/DEPTNO'))     as DEPTNO,
     substr(extractValue(value(x),'/ROW/DNAME'),1,10) as DNAME,
     substr(extractValue(value(x),'/ROW/LOC'),1,10)   as LOC
from
  table(xmlsequence(extract(xmltype( :xmltext ),'/ROWSET/ROW'))) x

to deliver a regular rowset of data as the view object's result without having to write any XML-parsing code.


3:53:10 PM    



I've added example #76 to illustrate how to use declarative techniques in the ADF page definition to optionally filter a view object's query by the value passed in a URL parameter, based on the presence or lack of that parameter.


9:29:31 AM    


© Copyright 2008 Steve Muench.