Expand my Community achievements bar.

Drill down in dynamic forms?

Avatar

Level 3
Hi folks,



I'm currently trying to design a form which incorporates a dynamic subform which has been bound to an xml based datasource.



However, I want to implement a button or something that displays or hides that subform dynamically at runtime, for example using the instance manager.



I can hide the subform without any problems, but it seems impossible to display it again with the bound data. I always end up with an empty form consisting of one empty line.



Is there any way to accomplish what I want, or a way to remerge the respective data to the subform?



Any help would be just great!



Thanks alot,



Steffen.
2 Replies

Avatar

Level 6
Hi Steffen,



How are you hiding the subform? If you remove the subform using the instance manager's "removeInstance" method, I believe you clobber the subform and its data. If you want to hide the subform but preserve its data, try setting the subform's presence to "hidden". To show it again, set the presence to "visible".



I have worked on projects where the data were "persisted" in form variables so that they could be brought back and remerged the way you are suggesting. So, that's possible too, but quite a bit trickier to develop.



Jared Langdon

J. Langdon Consulting, Inc.

Avatar

Level 3
Hello,



thanks for your reply.



Actually, it seems like I've already solved it in pretty much the second way you suggested via LoadXML and SaveXML. It doesn't seem to be very quick, but it works.



Thank you,



Steffen.