Ok, after searching the forum and google a lot, i figured out, that i can specify a data file in the formproperties. When i create some sample data, i get the structure the data has to look like (does it always have to look like these, or is it possible to change these things?).
But, what i'm still tryin' to figure out:
Is there a way, to get data for special items(textfields, tables, dropdownlists, ... ) from other sources, that i (perhaps) parse or read in an initialize event of of the items? I read a lot about a javascript DOMParser and the dataObject, but before i start try'n'error-coding these, i'd like to know if its worth the time?
Or is there any other way, i'm able to read any xml data (from a file) from within an event?
any help appreciated
Views
Replies
Total Likes
There are two levels of data binding - the binding that you have been playing with so far represents that data that is collected in the form and is used when you submit the data for processing. The second set of data binding is used for populating dropdowns or getting partial information into the form (i.e. populating fields based on a database or Web Service call). These bindings are called execute bindings. These are the bindings that you shoudl be using to do the tasks that you mentioned. Note that if you are using Reader that you must apply Reader Extensions to your form to allow for these conenctions to happen. If you are an Acrobat user there are no Extensions required.
Paul
Views
Replies
Total Likes
for example, when i add this:
var dataO = importData("./data.xml", false);
to an event of a button, i get:
ReferenceError: importData is not defined
when the event appears.("this.importData is not a function" when replacing "importData" with "this.importData", like its written in http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf , p318)
Views
Replies
Total Likes
You are looking at an AcroForm reference but are coding on an XFA form. The "this" keyword in AcroForm refers to the document object. In xfa you get to the same thing by event.target. "this " in XFA refers to the object that is executing the script hence you are getting the error. You could make the command pur xfa by using:
xfa.host.importData("./data.xml, false)
Paul
well, this looks like a fact that should push me in the right direction. Sorry for beeing such a noob, but the project was just given to me having never ever worked with livecycle. Try'n'error all day just with a few (not very good) tutorials and google isnt that much fun. So thx very much.
Views
Replies
Total Likes
today i tried the:
xfa.host.importData("./data.xml", false);
i get a "general exception" at this point, which tells me that the number of arguments is wrong. If i leave out the second argument (the "false" one), i get a "NotAllowedError" exception, which tells me that security preferences deny my attempt to use that function. Where can i configure this or what am i doing wrong?
(because this one is developing away from my original problem, i opened another thread ( http://forums.adobe.com/thread/514822 ) which describes my original issue more in detail)
Views
Replies
Total Likes
I do not think that you can automate the import of the data without the users intervention. Try using xfa.host.importData(). This will bring up a dialog and allow the user to select the file they want.
Paul
Views
Replies
Total Likes
Thats the point, i especially do not want the user to interact with that part of the form.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies