We have a client that requires a fairly complex data model. The value of the data model is not only quite huge (about 500-1000 fields nested in many objects), you also need to send and receive all the data at any time when the field changes all the time (after it loses focus). We get everything as JSON. Here is an example structure:
{ data: { somefield: 'some content' }, label: { somelabel: 'some label text' }, applyable: { somefield: { visible: false } } someSubForm: { data: { somefield: 'some content' }, label: { somelabel: 'some label text' }, anotherSubForm: { data: { somefield: 'some content' }, label: { somelabel: 'some label text' } } } }
But that is not all; the model also contains tags, tooltips, and other configurations. All data should be displayed on several tabs, where it is possible that the same data is displayed in two different tabs. Due to the necessary layout (defined by the client), the forms will be nested together.
The backend is provided by our client, so I can’t change anything here.
I started by using one model with a specific proxy to load JSON. But after that, I ran into several problems.
Firstly, the form will always track all the fields, even one of the nested forms. Secondly, I cannot change any labels or apply user settings. Thirdly, due to the huge amount of data, the loadRecord () and getValues methods () performed quite a while.
My question is, how can I break this down so that each form only processes its own data, not all the data, and how could I apply user settings?