textfield1 is read only by default. By pressing the button, user should reset the whole form and only then would enter data in textfield1. On the other hand after pressing the button, form data and structure resets but textfield1 remains read only. Row3 can not create any change. textfield1 should become open but it remains read only. I think its because of the asynchronous nature of java code. Row3 do its job in the first place. But all three lines run at the same time and because of this, Row2 kills Row3's action.
My purpose is to avoid people to share already filled forms between each other and then submit them as they personally filled it. textfield1 is for a unique tax id number and a person at least must change this field to fill the form properly.
So if the code works, a person can not enter his tax id number to textfield1 just after opening the form because it is read only. The only way to proceed would be pressing the button, by doing this he resets all the data and form structure + make textfield1 open so he can enter data to it. After entering tax id number, I have a seperate code that makes textfield1 read only again. So whenever you want to change the tax id number, you must reset all the form and structure.
I was thinking that this is a good work flow but it does not work.
Is there a way first "xfa.form.remerge ();" and AFTER THEN "textfield1.access = "open"?
On the other hand, if I can remerge a form partially, it would also work.