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
BedrockMission!

Learn More

View all

Sign in to view all badges

Reflect xfa data updates into form fields without xfa.form.remerge()

Avatar

Avatar
Validate 10
Level 5
tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Validate 10
Level 5
tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Give Back 50
Give Back 5
Give Back 3
View profile
tarekahf
Level 5

13-02-2017

Following the very useful sample provided here:

Re: SaveXML and LoadXML problem

I noticed that if you update the field values, then the data model is updated immediately, however, if you update the data model node values, then the bound field values are not reflected unless you execute xfa.form.remerge() or xfa.datasets.loadXML(...).

I was looking for a solution to update the data model node values on the form initialize event or load event, and all bound element values to be reflected accordingly. The purpose is to execute a web-service before data binding occurs, and load the data model with the result of the web-service, but without executing remerge() nor loadXML() since both will trigger the "init" events for all elements, and it will be a problem.

The reason for this is that we are binding the element captions to the data model (Data Connection) to implement localization for the form fields.

If this is not possible, this means the only way is to load the data with the XML Data File used to merge with the form template when the form is generated.

The other solution is to load the data using the web service, and write code to update the caption values directly. But this approach removes the abstraction layer of the data model and data binding which helps make the code easier to maintain.

Appreciate your feedback.

Tarek

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 10
Level 5
tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Validate 10
Level 5
tarekahf
Level 5

Likes

32 likes

Total Posts

409 posts

Correct Reply

10 solutions
Top badges earned
Validate 10
Validate 1
Give Back 50
Give Back 5
Give Back 3
View profile
tarekahf
Level 5

13-02-2017

I believe this thread may have the solution I am looking for:

Tarek