{"title":"CRUD字典模式","inframe":true,"hidden":false,"roles":{"demo":1,"dev":1},"pageLink":"","children":[{"configs":{"itemId":"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});"},"children":[{"configs":{"height":"160","hidden":"true","width":"180","layout":"fit","left":"0","itemId":"menu","modal":"true","top":"0","hideOnMaskTap":"true"},"children":[{"configs":{"itemTpl":"<div style='height:40px'><span class='wb_glyph'>&#x{glyph};<\/span>&nbsp;{text}<\/div>","scrollable":"false","itemId":"dataview1","padding":"8"},"events":{"itemtap":"app.menu.hide();\nrecord.get('handler')();"},"children":[{"configs":{"data":" [{\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   forSQL: true,\n   glyph: 'f021',\n   handler: app.refresh\n }]","itemId":"store","fields":"['text', 'glyph', 'handler']"},"children":[],"type":"tstore","expanded":false}],"type":"tdataview","expanded":true}],"type":"tpanel","expanded":true},{"configs":{"layout":"fit","itemId":"viewport1"},"children":[{"configs":{"layout":"fit","itemId":"container1"},"children":[{"configs":{"title":"WB_MISC","docked":"top","itemId":"toolbar"},"children":[{"configs":{"glyph":"f0c9","align":"right","itemId":"menuBtn"},"events":{"tap":"app.menu.showBy(button);"},"children":[],"type":"tbutton","expanded":false}],"type":"ttitlebar","expanded":true},{"configs":{"itemTpl":"{STRING_FIELD}","autoPaging":"true","itemId":"list1"},"children":[{"configs":{"itemId":"store","autoLoad":"true","url":"m?xwl=examples/crud/crud-db-access/select"},"children":[],"type":"tstore","expanded":false}],"type":"tlist","expanded":true}],"type":"tcontainer","expanded":true}],"type":"tviewport","expanded":true}],"type":"module","expanded":true}],"iconCls":""}