Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    "Bad data returned" when using multiple="true"

    SmartClient Version: v8.3p_2013-03-13/PowerEdition Deployment (built 2013-03-13)

    I have the following two related datasources.
    Code:
    <DataSource ID="IPWKWGT" dataFormat="iscServer" serverType="sql" dbName="as400"
    	serverConstructor="com.islandpacific.gui.server.replenishment.IpWkwgtDS">
    	<fields>
    		<field name="itemClass" nativeName="WCLS" title="Class" type="text" length="4" textMatchStyle="equals" primaryKey="true"/>
    		<field name="itemVendor" nativeName="WVEN" title="Vendor" type="text" length="6" textMatchStyle="equals" primaryKey="true"/>
    		<field name="itemStyle" nativeName="WSTY" title="Style" type="text" length="7" textMatchStyle="equals" primaryKey="true"/>
    		<field name="itemColor" nativeName="WCLR" title="Color" type="text" length="4" textMatchStyle="equals" primaryKey="true"/>
    		<field name="itemSize" nativeName="WSIZ" title="Size" type="text" length="5" textMatchStyle="equals" primaryKey="true"/>
    		<field name="description" customSQL="true" type="text" canFilter="false"/>
    		<field name="year" nativeName="WYRS" title="Year" type="integer" length="4" primaryKey="true"/>
    		<field name="storeCurves" customSQL="true" type="IPWKWGT_Store" multiple="true" hidden="true"/>
    	</fields>
    </DataSource>
    Code:
    <DataSource ID="IPWKWGT_Store">
    	<fields>
    		<field name="storeNumber" title="Store Number" type="integer" primaryKey="true"/>
    		<field name="curveValues" type="integer" multiple="true" hidden="true">
    		</field>
    	</fields>
    </DataSource>
    Field storeCurves in IPWKWGT has type="IPWKWGT_Store" and multiple="true". Field curveValues in IPWKWGT_Store is type="integer" and multiple="true"

    I have a grid that displays records in IPWKWGT. The fetch request to fill the grid results in this data in the response, which looks correct to me.
    Code:
    [
        {
            data:{
                itemVendor:"00001", 
                itemSize:"0010", 
                itemClass:"0001", 
                itemStyle:"0010", 
                year:2011, 
                storeCurves:[
                    {
                        storeNumber:3, 
                        curveValues:[
                            5, 
                            5, 
                            5, 
                            6, 
                            6, 
                            6, 
                            7, 
                            7, 
                            7, 
                            8, 
                            8, 
                            8, 
                            9, 
                            9, 
                            5, 
                            5, 
                            5, 
                            6, 
                            6, 
                            6, 
                            7, 
                            7, 
                            7, 
                            8, 
                            8, 
                            8, 
                            9, 
                            9, 
                            5, 
                            5, 
                            5, 
                            6, 
                            6, 
                            6, 
                            7, 
                            7, 
                            7, 
                            8, 
                            8, 
                            8, 
                            9, 
                            9, 
                            5, 
                            5, 
                            5, 
                            6, 
                            6, 
                            6, 
                            7, 
                            7, 
                            7, 
                            8, 
                            0
                        ]
                    }, 
                    {
                        storeNumber:99111, 
                        curveValues:[
                            8, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            9, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0
                        ]
                    }, 
                    {
                        storeNumber:332, 
                        curveValues:[
                            9, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            9, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0
                        ]
                    }, 
                    {
                        storeNumber:2, 
                        curveValues:[
                            1200, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            300, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0
                        ]
                    }, 
                    {
                        storeNumber:2, 
                        curveValues:[
                            3, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            7, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0, 
                            0
                        ]
                    }
                ], 
                itemColor:"010"
            }, 
            endRow:1, 
            invalidateCache:false, 
            isDSResponse:true, 
            operationType:"fetch", 
            queueStatus:0, 
            startRow:0, 
            status:0, 
            totalRows:1
        }
    ]
    But on the SC dev console I see this message and the ListGrid is stuck at "Loading data".
    Code:
    09:33:31.415:XRP6:WARN:ResultSet:isc_ResultSet_27 (created by: isc_IpListGrid_8):Bad data returned, ignoring: {itemVendor: "00001",
    itemSize: "0010",
    itemClass: "0001",
    itemStyle: "0010",
    year: 2011,
    storeCurves: Array[5],
    itemColor: "010"}

    #2
    Nevermind. I found the problem. The response data was a Map instead of a List of Maps.

    [
    {
    data:{
    etc.

    instead of

    [
    {
    data:[
    {
    etc.

    Comment


      #3
      can i see your operationBindings part and the iterating code

      hi ,can i see your operationBindings part and the iterating code ? i have tried this but failed . need your help .thanks

      Comment

      Working...
      X