Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Forms 检查extjs中通过表单发送的值_Forms_Extjs_Submit_Handler_Sencha Architect - Fatal编程技术网

Forms 检查extjs中通过表单发送的值

Forms 检查extjs中通过表单发送的值,forms,extjs,submit,handler,sencha-architect,Forms,Extjs,Submit,Handler,Sencha Architect,我在extjs中使用一个字段集,并希望提交值。现在我想用警报检查这些值,但我不知道怎么做 {    "xtype": "fieldset",    "height": 377,    "id": "configurationDriversConfiguration",    "width": 648,    "layout": {       "type": "auto"    },    "collapsible": true,    "title": "Driver Configuratio

我在extjs中使用一个字段集,并希望提交值。现在我想用警报检查这些值,但我不知道怎么做

{
   "xtype": "fieldset",
   "height": 377,
   "id": "configurationDriversConfiguration",
   "width": 648,
   "layout": {
      "type": "auto"
   },
   "collapsible": true,
   "title": "Driver Configuration",
   "items": [
      {
         "xtype": "button",
         "id": "configurationDriversAdd",
         "text": "Add"
      },
      {
         "xtype": "button",
         "id": "configurationDriversDelete",
         "text": "Delete"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversCode",
         "fieldLabel": "Driver Code"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversName",
         "fieldLabel": "Driver Name"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversLicense",
         "fieldLabel": "Driver License nr"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversGivenName",
         "fieldLabel": "Driver Given Name"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversFamilyName",
         "fieldLabel": "Driver Familiy Name"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversPhone",
         "fieldLabel": "Driver Phone Nr"
      },
      {
         "xtype": "textfield",
         "id": "configurationDriversEmail",
         "fieldLabel": "Driver Email"
      },
      {
         "xtype": "combobox",
         "id": "configurationDriversProvider",
         "fieldLabel": "Provider",
         "displayField": "name",
         "store": "comboProviders",
         "valueField": "id"
      },
      {
         "xtype": "textareafield",
         "id": "configurationDriversMemo",
         "fieldLabel": "Memo"
      },
      {
         "xtype": "button",
         "height": 37,
         "id": "configurationDriversSave",
         "text": "Save"
      }
   ]
}

这是我的密码。当我点击save时,我想看到所有的值。我使用Sencha Architect,但找不到此的处理程序,请在“保存”按钮定义中添加类似的内容:

handler: function(btn) {
   var fieldSet = btn.up('fieldset');
   Ext.Array.each(fieldset.items, function(i) {
       console.log(i.getValue());
   });
}

你到底需要什么?检查哪些值?你是在寻找某种验证吗?验证会很好。但我需要的是,当我按下save时,它会执行一些操作:)并且要查看它的功能,我希望查看提交的值。例如,在configurationDriversNamei中填写的内容是:handler:function(button,event){var fieldSet=button.up('configurationDriversConfiguration');Ext.Array.each(fieldSet.items,function(i){alert(i.getValue();});}但我得到的字段集是未定义的Ext.Array.each(fieldSet.items,函数(i){error我想如果你需要按id查找,你需要在选择器中指定#my_id。如果没有任何东西-这将是xtypeCome,伙计…试着阅读一些关于如何遍历项目数组的文档。我说我的代码不是完美的示例-而是一个方向。