Expand my Community achievements bar.

resetData and taking the form back to Render State

Avatar

Level 10

I am rendering the PDF with an XML data at runtime.. The user make some changes and decides to rollback all the changes done in that session.

Currently I am using the command xfa.host.resetData(); which is blanking out all the fields in the form.

Can the form be taken back to the rendered state which means when I click on a button, it should only delete the newly added data after the form Render.

In a sense how can I reload all the data from the input XML source.

I tried the following but all the fields are still blank..

xfa.host.resetData();

xfa.form.remerge();

May be I am missing some thing.. Can some one point me in the right direction..

Thanks

Srini

1 Reply

Avatar

Level 10

Hi Srini,

Where merged data creates new instances of repeating objects, I have a reset button that resetData() and then loops through and removeInstance() until the table is back to the initial state.

https://acrobat.com/#d=RZ1lzX23*u7L4N9rtWCYPQ

Good luck,

Niall