Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Model View Controller XFA Sample


I'm trying to integrate a sample PDF file from Adobe in Web Dynpro for Java (NW2004 SPS 15):

<a href="">Model View Controller XFA Sample (PDF, 84k)</a>

If I just render the PDF, it works just fine. I do this by using an InteractiveForm UI element where I set the "mode" property to "usePdf" so only the (binary) "pdfSource" property is used and the "dataSource" and "templateSource" properties are ignored. The content of the "pdfSource" property is set to the actual PDF file I previously uploaded via a FileUpload UI element. When I say it works fine, I mean the PDF renders fine, one page at a time and the navigation buttons also work fine.

What I like to do next is to make the PDF interactive. I open the PDF file in Adobe LiveCycle Designer 7.0 (stand alone; outside NWDS) and save it as an XDP file. Then I replace (on the file system) the created XDP in my Web Dynpro application with the new one, in order to work with the XDP within NWDS. From now on it's like working with a regular interactive form Web Dynpro application.

When I create a new InteractiveForm UI element, <u>without</u> setting the "dataSource" property, I can right click the InteractiveForm UI element, choose "Edit", and within the Adobe LiveCycle Designer plugin in NWDS click on "PDF Preview". It still works ("PDF Preview" at design time, it doesn't work at runtime without the dataSource property being set): the PDF renders fine, one page at a time and the navigation buttons also work fine. So far so good.

Now, when I do set the "dataSource" property by binding it to a context node (without any attributes) and I click again (after closing and re-opening the Adobe Designer plugin) on "PDF Preview", all I see is one (almost blank) page and the navigation breaks too.

When I add some attributes to the context and define some data bindings in the form, only those pages that contain an element with a data binding are rendered. As such, this is not a real problem because typically all pages contain at least one element with a data binding, it could even be a hidden element. But the problem is that:

1. all pages are rendered at once, below each other (instead of just one page at a time)

2. the navigation doesn't work anymore

FYI, I did try this code in <u>wdDoModifyView</u>

if (firstTime) {
  IWDInteractiveForm form =
    (IWDInteractiveForm) view.getElement("InteractiveForm1");

but that didn't make a difference.

I also tried using the PDFObject API directly, but that didn't help either.

Does someone know about a certain limitation in the ADS that prevents this type of document (Model View Controller XFA) to be created as expected? Or is there some solution to this problem, e.g. some specific configuration setting of ADS?

Any feedback is greatly appreciated!

Kind regards,


Not what you were looking for? View more on this topic or Ask a question