UiBot icon indicating copy to clipboard operation
UiBot copied to clipboard

Callback event object lacks form parameters

Open awilhite opened this issue 13 years ago • 2 comments

Great framework. It's been of much use. However, I'm stuck on getting form data on the server. Had you actually had it working at some point? If you have any idea what's going on, your help would be much appreciated. Thanks.

Form UI


  var deleteCustomer = {
    wType: 'VerticalPanel',
    id: "deleteCustomer",
    items: [
      {
      wType: 'HorizontalForm',
      id: 'deleteCustomerForm',
      items: [{
        wType: 'ListBox',
        name: 'customer'
      }, {
        wType: 'Button',
        text: 'Delete Customer',
        onClick: {
          callback: 'deleteCustomer',
          cbElement: 'deleteCustomerForm'
        }
      }],
    }]
  };

Server-Side Handler


UiBot.addProperty = function(e) {
  Logger.log(e);
};

Log

{parameter={clientY=150, clientX=440, eventType=click, ctrl=false, meta=false, source=u82876828834, button=1, alt=false, screenY=254, screenX=485, y=8.18182373046875, shift=false, x=39.090911865234375}}

awilhite avatar Dec 29 '12 03:12 awilhite

Hi - try changing the "cbElement" property of "onClick" to "cbElementId" and let me know if that fixes the issue (also in the code above I think you meant to put UiBot.deleteCustomer in the server side handler)...

gotdan avatar Dec 30 '12 14:12 gotdan

Yeah, that did it, thanks.

awilhite avatar Jan 02 '13 22:01 awilhite