Announcement

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

    Field is not sent to the server

    Here is my ListGrid definition:
    Code:
    this.lstCauseHumanFactor = isc.ListGridComboBoxEdit.create({
    			    dataSource: "CauseHumanFactor", 
    			    width:460, 
    			    height:200, 
    			    removingCol: 3,
    			    alternateRecordStyles:true, 
    			    showAllRecords:true, 
    			    showEmptyMessage: false,
    			    autoSaveEdits: false,
    			    emptyMessage:"",
    			    showHeader:true,
    			    cellHeight:22,
    			    canEdit: true,
    			    editEvent: "click",
    			    listEndEditAction: "next",
    			    canEditCell: 
    	        	function (rowNum, colNum) 
    	        	{
    	     			var record = this.getEditedRecord(rowNum);
    	     			if (colNum != this.removingCol)
    	     			{
    	         			return true;
    	         		}	
    	         		else
    	         			return false;
    	     		},
    			    fields:[
    			        {name: "name", title: "Name", type: "text", length: 50, width:150},
    			        {name: "description", title: "Description", type: "text", length: 500, width:200},
    			        {name: "worknum", title: "Work Number", type: "Integer", length: 5, width:85},
    			        {name:"remove",  showTitle: false,  type:"header", width: 20, defaultValue: "",
    			         formatCellValue :"isc.Canvas.imgHTML('../../../common/images/scdelete.jpg', 16, 16)"
    			        }
    			   	]
    		});
    DataSource:
    Code:
     isc.DataSource.create({
    	ID:"CauseHumanFactor",
    	dataFormat:"xml",
    	dataURL:"../../accidents/forms/accidents.asp?requesttype=post&datarequest=xml&methodexecute=mSaveApplicationData&formname=CauseHumanFactor",
    	dataProtocol:"postParams",
    	recordXPath:"//causehumanfactor",
            fields:[
            {name:"id", primaryKey:true, hidden:true, type:"sequence"},
            {name:"file_id", primaryKey:true},
            {name:"name"},
            {name:"description"},
            {name:"worknum"}
        ]
     });
    I am saving data:
    listGrid.saveAllEdits(null);

    And as you can see Field "description" is not transmitted to the server:
    Code:
    08:37:41.499:MUP1:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    08:37:41.505:MUP1:INFO:RPCManager:sendQueue[10]: 1 RPCRequest(s); transport: xmlHttpRequest; target: ../../accidents/forms/accidents.asp?requesttype=post&datarequest=xml&methodexecute=mSaveApplicationData&formname=CauseHumanFactor
    08:37:41.516:MUP1:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    08:37:41.523:MUP1:DEBUG:RPCManager:XMLHttpRequest POST to ../../accidents/forms/accidents.asp?requesttype=post&datarequest=xml&methodexecute=mSaveApplicationData&formname=CauseHumanFactor contentType: application/x-www-form-urlencoded; charset=UTF-8 with body -->id=0&file_id=0&name=qwer&worknum=1235465&_transaction=<transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">10</transactionNum><operations xsi:type="xsd:List"><elem>__ISC_NULL__</elem></operations></transaction>&protocolVersion=1.0<--
    08:37:42.013:XRP8:INFO:RPCManager:transaction 10 arrived after 498ms
    08:37:42.019:XRP8:DEBUG:RPCManager:Result string for transaction 10: "<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
    <VFPData>
    	<causehumanfactor>
    		<id>5</id>
    		<file_id>1</file_id>
    		<name>qwer</name>
    		<description>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </description>
    		<worknum>1235465</worknum>
    	</causehumanfactor>
    </VFPData>
    "
    08:37:42.025:XRP8:INFO:RPCManager:rpcResponse(unstructured) results -->"<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
    <VFPData>
    	<causehumanfactor>
    		<id>5</id>
    		<file_id>1</file_id>
    		<name>qwer</name>
    		<description>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </description>
    		<worknum>1235465</worknum>
    	</causehumanfactor>
    </VFPData>
    "<--
    Am I missing something abvious here?

    Thanks

    #2
    ListGrids send only updated fields and the primaryKey field by default. If you want all the values to be transmitted, the original values are available as dsRequest.oldValues, and you can combine them with the new values in dataSource.transformRequest.

    Comment


      #3
      But the thing is I am entering data into descrition field.

      Comment


        #4
        I can't see anything obvious in your code, however, many examples and internal tests show this feature working. Can you try to reproduce this with standalone files in a stock SmartClient SDK, and if you succeed, send us the test case?

        Comment


          #5
          I will try to replicate the problem in SC SDK but a simple code modification discovered that if I change a length of the field from 500 to 50 (for example) the field becomes a part of a POST with no other changes in the code.

          Comment

          Working...
          X