{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"itemId":"menu","menu":" [{\n   text: '添加',\n   glyph: 'f067',\n   handler: app.add\n }, {\n   text: '修改',\n   glyph: 'f044',\n   handler: app.edit\n }, {\n   text: '删除',\n   glyph: 'f00d',\n   handler: app.remove\n }, {\n   text: '刷新',\n   glyph: 'f021',\n   handler: app.refresh\n }]"},"expanded":false,"children":[],"type":"tpanel"},{"configs":{"layout":"fit","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"layout":"fit","itemId":"container1"},"expanded":true,"children":[{"configs":{"itemId":"toolbar","title":"WB_MISC","docked":"top"},"expanded":true,"children":[{"configs":{"itemId":"menuBtn","glyph":"f0c9","align":"right"},"expanded":false,"children":[],"type":"tbutton","events":{"tap":"app.menu.showBy(button);"}}],"type":"ttitlebar"},{"configs":{"itemId":"list1","autoPaging":"true","itemTpl":"{STRING_FIELD}"},"expanded":true,"children":[{"configs":{"itemId":"store","autoLoad":"true","url":"m?xwl=examples/crud/crud-db-access/select"},"expanded":false,"children":[],"type":"tstore","events":{"load":"//设置布尔字段的自定义编辑器\nvar col = Wb.getColumn(store, 'BOOL_FIELD');\ncol.editor = app.list1.initialConfig.BOOL_FIELD;"}},{"configs":{"itemId":"BOOL_FIELD","label":"布尔字段"},"expanded":false,"children":[],"type":"ttoggle"}],"type":"tlist","events":{"itemdoubletap":"app.edit();"}}],"type":"tcontainer"}],"type":"tviewport"}],"type":"module","events":{"initialize":"//相关示例请参考examples/crud/dict-dialog-edit\nWb.apply(app, {\n  add: function() {\n    Wb.insert(app.list1, {\n      url: 'm?xwl=examples/crud/crud-db-access/insert'\n    });\n  },\n  edit: function() {\n    Wb.edit(app.list1, {\n      url: 'm?xwl=examples/crud/crud-db-access/update',\n      titleField: 'STRING_FIELD'\n    });\n  },\n  remove: function() {\n    Wb.del(app.list1, {\n      url: 'm?xwl=examples/crud/crud-db-access/delete',\n      titleField: 'STRING_FIELD'\n    });\n  },\n  refresh: function() {\n    app.store.load(); //不可使用app.store.reload，因为最后一次加载属于添加模式\n  }\n});"}}],"roles":{"demo":1},"title":"CRUD字典模式","iconCls":"","inframe":true,"pageLink":""}