Announcement

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

    datasource.updateData and additional parameters

    Good localtime(),

    I'm trying to do an updateData, and besides sending the data I want to send some additional parameters as well. The records are in a ListGrid, and this is the code I made:

    Code:
    listCourse.selectAllRecords();
    var data = listCourse.getSelection();
    StudentsInCourseDS.updateData(
    	data,
    	null,
    	{
    		params: {
    			ACYear: selectsform.getField('acyearid').getValue(),
    			ACTerm: selectsform.getField('termid').getValue(),
    			courseID: courseidform.getField('courseid').getValue()
    		}
    	}
    );
    is submits the record OK, but not the parameters. No syntax error or whatsoever. What am I doing wrong now?

    #2
    Hi kodid04,

    That looks generally correct, however, what type of DataSource is that (dataFormat:"xml", RestDataSource, dataFormat:"iscServer" .. ?) and how are you attempting to retrieve the parameters in your server-side code?

    Comment


      #3
      I have serverType: "sql" in my code, and on the server I have a .php file, and try to retrieve the values via the $_GET array, but the values don't even appear in firebug. I had no dataFormat set, now I tried with "xml", but didn't make a difference.

      Comment


        #4
        If you have not change from the default dataProtocol, the data itself is being sent as URL parameters. You should add these additional values to the "data" parameter you are passing to updateData().

        Comment

        Working...
        X