Announcement

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

    willHandleError has no effect on form.saveData ?

    SmartClient Version: v9.0p_2013-11-15/PowerEdition Development Only (built 2013-11-15)

    modify the #formsBlockingErrors sample like this:

    Code:
    isc.DynamicForm.create({
        ID: "boundForm",
        dataSource: "complaint",
        wrapItemTitles: false,
        fields: [
            {type:"header", defaultValue:"Shipment Complaint Form"},
            {name: "trackingNumber", stopOnError: true},
            {name: "receiptDate", useTextField: true},
            {name: "comment", editorType: "textArea"},
    	{name: "submitBtn", title: "Submit", type: "button", click: "form.saveData(function(dsResponse, data, dsRequest){isc.logEcho('callback')}, {willHandleError:true})"}
        ]
    });
    then type a random tracking # and press 'submit'.
    I was expecting the callback would be invoked, due to willHandleError:true, but it isn't.

    Is it a bug, or I'm missing something?

    #2
    Validation is actually occurring before the submit button is processed because the stopOnError field has implied validateOnExit and synchronousValidation settings as well.

    So in your case the button click handler is never called.

    Comment


      #3
      thanks for your reply, but without the stopOnError setting, the behaviour is the same.

      Edit: I stand corrected, you're right.
      Last edited by claudiobosticco; 19 Nov 2013, 14:46.

      Comment

      Working...
      X