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

preventing a relayout after import data

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

10-09-2010

On the first part of my form are buttons, user picks either button and the proper form is displayed. The first page is hidden. After that they need to import data using: xfa.host.importData("");  The system browser lets them select the XML file. When the data is merged the file rerenders and the first page is visible again. How can I fix this.

Replies

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct Reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct Reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

10-09-2010

Hi,

If you have script in the initialize event to set up the pges (visible/hidden), consider moving this to the docReady event, which fires only once.

Otherwise include script to display the appropriate pages, AFTER the import XML line.

Niall

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

10-09-2010

Niall

I do not have a script on the initialize event. I have a click event that is triggered by the user. The buttons on the cover page work fine. The problem occurs when I use xfa.host.importData(""); on a click event. The state of the form is reset to the way it opened and the cover page is visible again.

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct Reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct Reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

12-09-2010

ahh,

I see the problem now. As you say, it appears that the form layout is redone after the data merge. I not sure if you can stop this. I have tried a few options for rehiding the relevant pages again, using flags, etc, but can't get that to work.

If I come up with anything I will post here.

Sorry,

Niall

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

13-09-2010

Thanks. I appreciate the help. I was able to sort of fix it by resetting the form in the Initialize event. I have an if statement that checks some things after data is loaded then sets the form based on that. Its a bit klugy though.