ADF Binding XML data directly from ADF BC to JSP and JSTL (XML-tags)

Lucas Jellema 1
0 0
Read Time:1 Minute, 28 Second

In this post I discuss how the ADF Binding Framework and the ADF Business Components Model can be used to import model-data as XML into a JSP and more specifically into JSTL-XML tags . It is largely based on the exchange I had with Steve Muench. The article proposes an alternative to the use of JSTL’s SQL tags to select data that is then transformed into XML Document variables within a JSP. This is an approach I used in several previous posts: SVG, XSLT and JSP/JSTL: Generating Digital Gauge or Speedometer Chart based on dynamic data, Generating SVG Graphics in JSPs using JSTL & XSL(T) – from MySQL to Bar Chart and Pie Chart and XSL Transforming XML generated from SQL results using JSTL tags in JSP pages – putting JSTL to the test.

We can make use of the writeXML() method on the ViewObject. This method returns an XML Document with the data from the current VO Row as well as all of its details through the ViewLinks defined for the ViewObject, for as many levels as is required.

See Steve Muench’s article in response to my initial questions: Questions on Exposing XML via Transient Attribute. It all started with one of Steve’s Not Yet Documented ADF Sample Applications:

Using ViewObject writeXML and JSTL XML Tag Library – Illustrates how to use the ViewObject writeXML() method to produce a multi-level XML message for an HR schema-based data model having Departments -> EmployeesInDepartment -> DirectReports->DirectReportJobHistory with a second detail collection under Departments of Deparments -> EmployeesJobHistory. This XML document is then set as a request attribute so that the JSTL XML library can render the multi-level information using XPath expressions. The sample contains both Struts and Model 1 examples (requires the HR schema).

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “ADF Binding XML data directly from ADF BC to JSP and JSTL (XML-tags)

  1. Unfortunately, Sample Application doesn’t not exists  to download on Not Yet Documented ADF Sample Applications > “Using ViewObject writeXML and JSTL XML Tag Library”
     
    Is it somehow possible for you to provide the sample application ?

Comments are closed.

Next Post

Tom Kyte part II. Using what we have learned

In this post we will tune a query from being hopelessly slow to fast. We will use “explain plan” to analyze the query plan. We will see how Oracle prevents you from doing stupid things. We will also see that preventing hard parses of queries will really speed up your […]
%d bloggers like this: