{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"layout":"border","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"toolbar1","region":"north"},"expanded":true,"children":[{"configs":{"itemId":"saveBtn","text":"多个表格和表单一起提交保存","iconCls":"save_all_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"var editing = Wb.findEditing(app.grid1);\nediting.completeEdit();\nediting = Wb.findEditing(app.grid2);\nediting.completeEdit();\nif (!Wb.verifyGrid(app.grid1) || !Wb.verifyGrid(app.grid2) || !Wb.verify(app.panel1))\n  return;\nWb.requestAg({\n  //url: 'm?xwl=examples/crud/crud-db-access/save-all',\n  params: {\n    data: [Wb.getModified(app.grid1), Wb.getModified(app.grid2), Wb.getValue(app.panel1)],\n    datatable1: [Wb.getModified(app.grid1)],\n    datatable2: [Wb.getModified(app.grid2)],\n    paneldata: Wb.getValue(app.panel1),\n    bean:\"springService\",\n    method:\"sendat\"\n  },\n  success: function(resp) {\n    var data = Wb.decode(resp.responseText);\n    Wb.syncCreate(app.grid1, data[0]);\n   // Wb.syncCreate(app.grid2, data[1]);\n  }\n});"}},{"configs":{"itemId":"item1","text":"-"},"expanded":false,"children":[],"type":"item"},{"configs":{"itemId":"new1Btn","text":"表格一添加","iconCls":"record_add_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.addEdit(app.grid1);"}},{"configs":{"itemId":"del1Btn","text":"表格一删除","iconCls":"record_delete_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.remove(app.grid1);"}},{"configs":{"itemId":"item2","text":"-"},"expanded":false,"children":[],"type":"item"},{"configs":{"itemId":"new2Btn","text":"表格二添加","iconCls":"record_add_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.addEdit(app.grid2);"}},{"configs":{"itemId":"del2Btn","text":"表格二删除","iconCls":"record_delete_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.remove(app.grid2);"}}],"type":"toolbar"},{"configs":{"layout":"@{type: 'vbox',align:'stretch'}","itemId":"container1","defaults":"{\n  flex: 1,\n  margin: 8\n}","region":"center"},"expanded":true,"children":[{"configs":{"itemId":"grid1","editable":"true","title":"表格一","multiSelect":"true"},"expanded":true,"children":[{"configs":{"itemId":"store","autoLoad":"true","url":"m?xwl=examples/crud/crud-db-access/select-employee"},"expanded":false,"children":[],"type":"store"}],"type":"grid"},{"configs":{"itemId":"grid2","editable":"true","title":"表格二","multiSelect":"true"},"expanded":true,"children":[{"configs":{"itemId":"store","autoLoad":"true","url":"m?xwl=examples/crud/crud-db-access/select-company"},"expanded":false,"children":[],"type":"store"}],"type":"grid"},{"configs":{"layout":"anchor","itemId":"panel1","defaults":"{\n  labelAlign: 'right',\n  margin: '8 0 0 0',\n  anchor: '-8'\n}","bodyPadding":"2 10 10 10","title":"表单"},"expanded":true,"children":[{"configs":{"itemId":"text1","fieldLabel":"文本框"},"expanded":false,"children":[],"type":"text"},{"configs":{"itemId":"number1","fieldLabel":"数字框"},"expanded":false,"children":[],"type":"number"}],"type":"panel"}],"type":"container"}],"type":"viewport"}],"type":"module"}],"roles":{"demo":1},"title":"多表格和表单","iconCls":"","inframe":false,"pageLink":""}