Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Dynamically creating and binding data

Avatar

Level 1

Hi everyone,

I am creating a form which is available in different languages. Therefore I created a radiobutton per language and on click of one of these buttons, I dynamiccally bind the XML fragment with an existing node (javascript code):

     xfa.data.node.loadXML(xml, true, true)

This works, since I display the XML code in a seperate text field to check.

Afterwards I want to dynamically bind my text elements to the data. Therefore, I already created the bindings to the XML nodes that will be generated later (like xfa.data.node.tag1.tag2).

However, I never see the content of the nodes, not even if I create and bind the XML on the initialise event of the root element (so without choosing a language, but certainly before the bound elements are loaded).

I can see the text when I change the calculate event of a text field as follows.

     xfa.data.node.tag1.tag2.value

I am able to access the XML nodes, but for one reason or the other the binding does not work.

Does anybody know how to fix this? All help would be greatly appreciated!

Kind regards,

Tim

1 Accepted Solution

Avatar

Correct answer by
Level 10

Unfortunately dyna,ic data binding si not supported in the current release. That is to say that once the form is rendered the binding that is set cannot be changed. You can read the property but you cannot change it.

Paul

View solution in original post

0 Replies

Avatar

Correct answer by
Level 10

Unfortunately dyna,ic data binding si not supported in the current release. That is to say that once the form is rendered the binding that is set cannot be changed. You can read the property but you cannot change it.

Paul

Avatar

Level 1

Hi Paul,

thank you for your answer.

Do you have any idea how I could best proceed to meet the requirements I have?

All hints are more than welcome!

Kind regards,

Tim

Avatar

Level 10

You woudl have to read teh data from the dom and set the values into the field yourself (with code). You will not be able to rely on the form bindings to do it for you as they are already set to other values.

Paul