see
http://www.nabble.com/dwr.gi.toCdfDocument-not-adding-jsxid-for-each-record-td18953346.html
http://directwebremoting.org/dwr/browser/gi
states that
toCdfDocument() will ensure that if objects passed to it have a jsxid property, this will be used as the jsxid for that record, or if none is available, one will be automatically generated.
When I pass it a array of objects, the CDF document is created with a record for each.
var cdf = dwr.gi.toCdfDocument(objResult, "jsxroot");
[ {className:null, entityStatus:null, legalName:"Fred", type:null}, {className:null, entityStatus:null, legalName:"Barney", type:null} ]
produces a document
<data jsxid="jsxroot">
<record legalName="Fred" ></record>
<record legalName="Barney" ></record>
</data>
Yes each <record/> w/in CDF must have a jsxid. GI uses it with the various controls to identify the row/node...
From
http://www.tibco.com/devnet/resources/gi/3_5/doc/html/wwhelp/wwhimpl/js/html/wwhelp.htm
"The jsxid attribute is required for a record in the CDF. This attribute acts as a key and should be a unique value. "
The CDF schema is described by the following XSD:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="cdfrecord" name="record"
maxOccurs="unbounded" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="jsxid">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="jsxroot"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="cdfrecord">
<xsd:sequence>
<xsd:element type="cdfrecord" name="record"
maxOccurs="unbounded" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="jsxtip" type="xsd:string"/>
<xsd:attribute name="jsxvalue" type="xsd:string"/>
<xsd:attribute name="jsxdivider" type="xsd:string"/>
<xsd:attribute name="jsxtext" type="xsd:string"/>
<xsd:attribute name="jsxstyle" type="xsd:string"/>
<xsd:attribute name="jsxkeycode" type="xsd:string"/>
<xsd:attribute name="jsxunselectable" type="xsd:string"/>
<xsd:attribute name="jsxexecute" type="xsd:string"/>
<xsd:attribute name="jsxgroupname" type="xsd:string"/>
<xsd:attribute name="jsximg" type="xsd:string"/>
<xsd:attribute name="jsxselected" type="xsd:string"/>
<xsd:attribute name="jsxid" use="required" type="xsd:string"/>
</xsd:complexType>
</xsd:schema