{"title":"基本可编辑表格","inframe":false,"hidden":false,"roles":{"demo":1,"dev":1},"pageLink":"","children":[{"configs":{"itemId":"module"},"children":[{"configs":{"layout":"fit","itemId":"viewport1"},"children":[{"configs":{"multiSelect":"true","itemId":"grid1","editable":"true"},"children":[{"configs":{"autoLoad":"true","itemId":"store","url":"m?xwl=examples/crud/crud-db-access/basic-select"},"children":[],"type":"store","expanded":false},{"configs":{"itemId":"tbar"},"children":[{"configs":{"text":"添加","itemId":"newBtn","iconCls":"record_add_icon","tooltip":"添加新的记录"},"events":{"click":"Wb.addEdit(app.grid1); //更多选项可使用Wb.add方法"},"children":[],"type":"item","expanded":false},{"configs":{"text":"删除","itemId":"delBtn","iconCls":"record_delete_icon","tooltip":"删除选择的记录"},"events":{"click":"Wb.remove(app.grid1);"},"children":[],"type":"item","expanded":false},{"configs":{"text":"-","itemId":"item1"},"children":[],"type":"item","expanded":false},{"configs":{"text":"保存","itemId":"saveBtn","iconCls":"save_icon","tooltip":"保存所有的更改"},"events":{"click":"if (!Wb.verifyGrid(app.grid1)) //验证数据是否合法\n  return;\nWb.sync({\n  grid: app.grid1,\n  url: 'm?xwl=examples/crud/crud-db-access/save',\n  message: '正在保存中...',\n  success: function(resp) {\n    //ID_FIELD值在后台生成，把返回的ID_FIELD值列表同步到表格中\n    Wb.syncCreate(app.grid1, Wb.decode(resp.responseText));\n  }\n});"},"children":[],"type":"item","expanded":false}],"type":"toolbar","expanded":true},{"configs":{"itemId":"columns"},"children":[{"configs":{"xtype":"rownumberer","itemId":"rowNumCol"},"children":[],"type":"column","expanded":false},{"configs":{"text":"字符串字段","width":"150","dataIndex":"STRING_FIELD","itemId":"stringCol"},"children":[{"configs":{"allowBlank":"false","itemId":"editor"},"children":[],"type":"text","expanded":false}],"type":"column","expanded":true},{"configs":{"text":"数字列","itemId":"numCols"},"children":[{"configs":{"text":"整数字段","align":"right","dataIndex":"INT_FIELD","titleAlign":"left","itemId":"intCol"},"children":[{"configs":{"itemId":"editor","allowDecimals":"false"},"children":[],"type":"number","expanded":false}],"type":"column","expanded":true},{"configs":{"text":"浮点数字段","align":"right","dataIndex":"DOUBLE_FIELD","titleAlign":"left","itemId":"doubleCol"},"children":[{"configs":{"itemId":"editor"},"children":[],"type":"number","expanded":false}],"type":"column","expanded":true}],"type":"column","expanded":true},{"configs":{"text":"布尔字段","xtype":"checkcolumn","dataIndex":"BOOL_FIELD","itemId":"boolCol"},"children":[],"type":"column","expanded":true},{"configs":{"text":"日期时间字段","width":"170","dataIndex":"DATETIME_FIELD","itemId":"datetimeCol"},"children":[{"configs":{"itemId":"editor"},"children":[],"type":"datetime","expanded":false}],"type":"column","expanded":true},{"configs":{"text":"大文本字段","dataIndex":"CLOB_FIELD","itemId":"clobCol","flex":"1"},"children":[{"configs":{"height":"150","itemId":"editor"},"children":[],"type":"textarea","expanded":false}],"type":"column","expanded":true}],"type":"array","expanded":true}],"type":"grid","expanded":true}],"type":"viewport","expanded":true}],"type":"module","expanded":true}],"iconCls":""}