Answer the question
In order to leave comments, you need to log in
How to build persistence of component application state?
Imagine the problem in a vacuum. There is an application that contains the following graphical components:
1
) an area with
a
menu 2)
a
list with checkboxes a specific tab) 2 lists with checkboxes located side by side.
When starting the application, it is required to submit a configuration file that simulates clicking on the desired tab of the root menu, then on the nested one, then arrange the checkboxes in the specified form. These actions do not need to be displayed, the user should immediately be presented with the desired view.
Here it is not clear how to preserve component independence. Those. the option to pass part of the configuration from the top elements to the bottom ones will not work, because an intermediate container can be inserted between them - for example, one of the lists will be placed in a frame or somewhere else.
Answer the question
In order to leave comments, you need to log in
Typically, components, along with their properties and states, are uploaded to an xml form. Then they load back. The hierarchy of components fits well in xml in the form of nested structures or as a link to the parent id. The state of the checkbox, for example, is only the value of the value field - 1 or 0.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question