Expand my Community achievements bar.

Loading data into datasets on load.

Avatar

Level 2

I need to pre-fill a dynamic PDF's fields so my users can edit it and  submit back.

I have a third party application (ColdFusion 9.0) that can load xml data for form frield into a given PDF and produce a new PDF.  ColdFusin (cfpdfform tag) opens the form and loads the data but unfutunatly it removes all  the datasets that were originally in the PDF. So in the result PDF some  drop down lists that were binded to datasets (such as a list of  Languages) do not work, they dont show any value.

Since I have no  control on how ColdFusion CFPDFFORM tag works, I came up with a workaround. I  stored whatever data there is in <xfa:datasets> into a variable in LiveCycle Design and  load it to datasets at form::initialize.

This seems to load  datasets just like how they were before cfpdform messed with it. I can read  the datasets and get identical results as I get from the original PDF with its  datasets tag full of xml data.

form1::initialize - (JavaScript, client)
//xfa.host.messageBox("loading xml to datasets");
xfa.datasets.nodes.namedItem("LOVFile").loadXML(LOVFile_var.value,0,1);
Page1.Header.debug.rawValue = xfa.datasets.LOVFile.LOV.PreferenceLanguageList.resolveNode("PreferenceLanguage[2]").value;

The problem is the downdown lists still don't pick up their data from datasets.

Here is an XML line from "Prefered Language" dropdown:
<bindItems ref="xfa.datasets.LOVFile.LOV.PreferenceLanguageList.PreferenceLanguage[*]" labelRef="$" valueRef="lic"/>

Is there anything else I need to do to perhaps make dropdowns reload their binding setting?

Any help or point to the right directly is greatly appreciated. thx

0 Replies