{"inframe":false,"title":"添加","hidden":false,"roles":{"dev":1},"children":[{"configs":{"importModules":"[\"m?xwl=dev/dict/refresh-buffer\"]","itemId":"module"},"children":[{"configs":{"itemId":"serverscript1","script":"//importModule比module.serverScript后加载，因此放到新添加的serverscript控件中\nvar id = SysUtil.getId(),\n  Utils = request.getAttribute('Utils');\nrequest.setAttribute('FIELD_ID', id);\napp.run('select 1 from WB_DICT where TABLE_NAME={?TABLE_NAME?} and FIELD_NAME={?FIELD_NAME?}', {\n  errorText: app.format('itemExist', app.get('FIELD_NAME'))\n});\n//update方法默认开始数据库事务\napp.update({\n  tableName: 'WB_DICT',\n  mode: 'insert'\n});\n//更新缓存中的数据\napp.refreshBuffer(); //方法定义在./refresh-buffer.xwl\n//发送fieldId同步到前台\napp.send({\n  FIELD_ID: id\n});"},"children":[],"expanded":false,"type":"serverscript"}],"expanded":true,"type":"module"}],"pageLink":"","iconCls":""}