You woudl have to define an input parameter for each field ....but there is a variable number of rows so this will not work. I woudl define a single string input parameter and pass the entire XML data that is in the form. You can create a hidden field to hold the data and bind the paraneter to that field. To get the data into the field use this command:
FieldName.rawValue = xfa.dataset.data.saveXML("pretty")
Then when you get the data into the web service you can parse or load the xml into a DOM and get what you want.
Hope that helps
-Insert a table in PDF Form.
-Create a method in WebService returning a Java Array Of Object and
create a Data Connection.
Using DataConnection you can bind the row of Table with Java Array of
Object (return type of web service method). i.e Employee Class Having
two properties "name" and "age". Store the object of class Employee in
Employee array. Bind the Array Employee with row of Table. Bind
the columns of row with properties "name" and "age".
You woudl need to load the data into the Dom and assuming the bindings are correct the data will fill the fields. To load the data int the dom you woudl use the command xfa.dataset.data.loadXML(fieldname that holds the data.rawValue). The key is to do find an event that will fire after the web service has completed.
The easiest way is to write the data file created to a file on the file system then use that as a data connection in designer and simply drag and drop the nodes in the xml onto the fields in the data stream. Note that you would only do the 1st row of the table.....then you would bind the repeating row subform to the repeating node in the xml.
I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
this is my code
xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
for(var i=0; i<count; i++)
xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
You shoudl not be putting the values into the table yourself ...this is handled by the binding. If you send me the form and the xml (you can put it into the recieving field and I can load it here) I will set the binding so you can see what needs to be done. You can send it to LiveCycle8@gmail.com .....please include a description of the issue in the email.