单击按钮后,我想将文本字段数据发送到 servlet。网格 tbar 中的文本字段和按钮。我正在使用 Ajax 请求来调用 servlet,但它没有调用它。
tbar: [{
  xtype: 'textfield',
  name: 'text'
}, {
  text: 'Serach',
  scope: this,
  handler: function () {
    Ext.Ajax.request({
      method: 'GET',
      loadMask: true,
      scope: this,
      url: 'http://localhost:8080/sampleweb/AccessServlet',
      success: function (response, request) {
        Ext.MessageBox.alert('success', response.responseText);
      },
      failure: function (response, request) {
        Ext.MessageBox.alert('failure', response.responseText);
      },
      params: {
        firstname: text.getValue()
      }
    });
  }
}]