cancel
Showing results for 
Search instead for 
Did you mean: 

Model View Controller XFA Sample

Sigiswald
Contributor
0 Kudos

Hi,

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

<a href="http://www.adobe.com/devnet/livecycle/articles/lc_designer_controller.pdf">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");
  form.setDynamicPDF(true);
}

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,

/Sigiswald

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192818
Active Participant
0 Kudos

Hey Sigiswald,

I am facing the same problem. I am on NW2004 SP 15 as well.

In my interractive forms two things in particular that dont work pique me.

1. Dynamic population of data in ValueHelps, DropDowns etc.

2. The SubmitToSAP and Check buttons provided in the WebDynpro tab of the Adobe Interactive Forms Designer.

Sumit.

Former Member
0 Kudos

Hi Sigiwald,

Please follow this solution:

Please switch on logging for the following location to "info":

Nw04: com.sap.tc.webdynpro.clientserver.adobe.AdobeFormHelper

Nw04s: com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.AdobeFormHelper

How to use Visual Administrator is described within note 742674. Then look for "createPDFDocumentForUIElement" in the trace file (usually defaultTrace). This trace statement will show the XML data that is provided to the Adobe Document Services. It is possible to copy this part and to save it with extension "xml" (e.g. file.xml) to the local file system. Then it can be display with a browser or XML editor.

- If it does not contain the values that are missing during an initial request, the application is definitely responsible for the problem.

- If it does contain the values, please double check whether the binding expressions in the XFA template (file with extension xdp) fits to the XML data.

If both statements have been checked, then it is an issue for CSN/OSS component BC-WD-JAV. Otherwise the application is responsible.

Thanks & Regards,

Raj.

Sigiswald
Contributor
0 Kudos

Hi Raj,

Where exactly do you configure this particular logging location? With Visual Administrator I go to

  • Cluster tab

  • J2E / Server / Services / Log Configuration

  • Runtime tab / Locations tab

  • ROOT LOCATION

- com.sap.tc.webdynpro.server.session.ServerSession

- com.sap.tc.webdynpro.services.session.WatchDog

=> but there's no such location as com.sap.tc.webdynpro.clientserver etc.

This is the case on NW2004 SP15, both on my local sneak preview installation and on the regular server installation.

Kind regards,

/Sigiswald