Expand my Community achievements bar.

loadXML problem

Avatar

Former Community Member

Hi,

If i use xfa.datasets.data.loadxml() function on a click button on the form, everything works fine except it shows and hides the fields on their respective initial state.

For ex: I have a textfield which is initially visible, I made it hidden on certain event on the form. Later called the loadxml() function. Now I see this field is visible which is ironic.

Data is shown perfectly in the textfield. But the problem occurs with its presence. That means, the form is not storing the current condition of fields presence and it simply putting the fields to their intitial state. I banged my head for a week to find the reason for this. I searched forums and didnt find a right solution for this. I have seen somewhat similar thread asked earlier which didnt got the appropriate answer.

I tried remerge() and many options.

Your help very much appreciated.

Thanks

kc

2 Replies

Avatar

Former Community Member

Can someone help me on this??

It's becoming more critical for me as all my radio buton and checkbox selections and objects presence status got reset with this command loadxml().

I expect loadxml() to only load data without distrubing the current state of the form. Or is there any way to reload data of the form?

Thanks,

kc

Avatar

Former Community Member

The issue is that if you make a change to the data dom (by adding nodes) then a remerge is automatically triggered. This causes your form to go back to

its original state. What is it that the extra data is supposed to do? Are you simply loading data into a DDlist or is it part of the data dom?

One other option is to write script on initialize of those fields to check whether it should be visible or not..

Paul