Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get all fields from DynamicForm

Tags:

xsd

smartgwt

I use DataSource generated from xsd schema. I need to get all fields from DataSource, also nested ones. My problem is the same like in this topic from Smartclient forum forum, when I use DataSource.getFields() its return only first level fields.

Does anyone know how can I get also nested fields?

like image 522
Mariusz Avatar asked Oct 18 '12 10:10

Mariusz


1 Answers

I m not exactly sure if this will solve your issue. CompanySlaves is not references in any where in xsd. Type is defined but not used.

I think you need to have <xsd:element name="SomeElementName" type="tns:CompanySlaves"></xsd:element> in your xsd definition

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/newXmlSchema"
    xmlns:tns="http://xml.netbeans.org/schema/newXmlSchema"
    elementFormDefault="qualified">
    <xsd:element name="SubrogationClaim" type="tns:SubrogationClame"></xsd:element>
    <xsd:complexType name="SubrogationClame">
        <xsd:sequence>
            <xsd:element name="CompanyName" type="xsd:string"></xsd:element>
            <xsd:element name="CompanyPlace" type="xsd:string"></xsd:element>
            <xsd:element name="CompanyEmploee" type="tns:SubrogationClame"></xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CompanySlaves">
        <xsd:sequence>
            <xsd:element name="EmploeeName" type="xsd:string"></xsd:element>
            <xsd:element name="EmploeeSalary" type="xsd:string"></xsd:element>
        </xsd:sequence>
    </xsd:ComplexType>
</xsd:schema>
like image 63
Ozgur Avatar answered Nov 08 '22 12:11

Ozgur