The solution: DynamicForm.showComplexFieldsRecursively
-----
Is it possible to nest DynamicForm multiple times?
For example: Application -> Applicant -> Address
application.ds.xml
applicant.ds.xml
address.ds.xml
I'm creating my DynamicForm from the application DS instance...
This includes everything in 'application' and 'applicant' accept the address. It doesn't seem like the NestedEditor created for 'applicant' is creating another NestedEditor for 'address'. NestedEditor uses a DynamicForm for it's internal editor, so I think it should work the same as at the root-level.
Is this expected behavior or a "feature"?
Maybe I don't understand the SmartClient DataSource architecture correctly. I'm separating my logical objects into separate datasources because they are resued multiple times in the root application datasource (for example, there's actually 2 applicant instances in my real model).
Thanks,
--mgbowman
PS: I know about the "flattened data model" example, but this requires me to repeat the same model properties multiple times with different names and xpaths. Trying to follow the DRY principle :-/
-----
Is it possible to nest DynamicForm multiple times?
For example: Application -> Applicant -> Address
application.ds.xml
Code:
<DataSource ID="application"> <fields> <field name="memo" type="text" /> <field name="applicant" type="applicant" /> </fields> </DataSource>
Code:
<DataSource ID="applicant"> <fields> <field name="name" type="text" /> <field name="address" type="address" /> </fields> </DataSource>
Code:
<DataSource ID="address"> <fields> <field name="line1" type="text" /> <field name="line2" type="text" /> <field name="city" type="text" /> <field name="state" type="enum"> <valueMap>...</valueMap> </field> <field name="zip" type="text" /> </fields> </DataSource>
Code:
isc.DynamicForm.create({dataSource:application});
Is this expected behavior or a "feature"?
Maybe I don't understand the SmartClient DataSource architecture correctly. I'm separating my logical objects into separate datasources because they are resued multiple times in the root application datasource (for example, there's actually 2 applicant instances in my real model).
Thanks,
--mgbowman
PS: I know about the "flattened data model" example, but this requires me to repeat the same model properties multiple times with different names and xpaths. Trying to follow the DRY principle :-/