Hi,
We have the DynamicForm class rendering a form based on an XSD schema and populating the form fields via XML. Simple forms are rendered fine, and fields can be validated against the schema. When it comes to rendering more than one item in a list, however, the DynamicForm class only renders (and populates) the first item. An example XSD schema:
Some example XML data:
Are we formatting our data in XML correctly for DynamicForm to render and populate fields correctly?
Is this a limitation of the DynamicForm class?
Should we be using something else to render a table based on a schema and then populate from XML?
Thanks
Pirow
We have the DynamicForm class rendering a form based on an XSD schema and populating the form fields via XML. Simple forms are rendered fine, and fields can be validated against the schema. When it comes to rendering more than one item in a list, however, the DynamicForm class only renders (and populates) the first item. An example XSD schema:
Code:
<?xml version="1.0" encoding="utf-8" ?> <!--Created with Liquid XML Studio Developer Edition (Trial) 8.0.9.2074 (http://www.liquid-technologies.com)--> <xsd:schema xmlns:isc="http://smartclient.com/XSExtensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="dlcConfig"> <xsd:complexType> <xsd:sequence> <xsd:element isc:title="User" minOccurs="1" maxOccurs="1" name="user" type="xsd:string" /> <xsd:element isc:title="Item" minOccurs="1" maxOccurs="10" name="item" type="itemEntry" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="itemEntry"> <xsd:sequence> <xsd:element isc:title="Quantity" name="quantity" type="xsd:integer" /> <xsd:element isc:title="Description" name="description" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:schema>
Code:
<?xml version="1.0" encoding="UTF-8"?> <response> <status>0</status> <startRow>0</startRow> <endRow>1</endRow> <totalRows>1</totalRows> <data> <record> <user>John</user> <item> <quantity>2</quantity> <description>This is an item</description> </item> <item> <quantity>4</quantity> <description>This is also an item</description> </item> </record> </data> </response>
Is this a limitation of the DynamicForm class?
Should we be using something else to render a table based on a schema and then populate from XML?
Thanks
Pirow
Comment