需求是使用“单表-列表+详细(对话框)”的模式,在弹出页面实现文件上载,使用控件是attachmentPC。
遇到问题是附件的字段中json里的fileid为空。
参考解决方案是
http://bbs.wex5.com/forum.php?mo ... =fileID%2B%E7%A9%BA
还有
http://bbs.wex5.com/forum.php?mo ... =fileID%2B%E7%A9%BA
但是,在弹出界面保存数据应该如何写?
我目前的写法是:
Model.prototype.okBtnClick = function(event) { var mainData = this.comp("dialogData"); mainData.saveData(); this.comp("windowReceiver").windowEnsure(mainData.getCurrentRow()); this.getParent().comp("mainData").refreshData(); };
执行到mainData.saveData();时,报错信息如下: 2016-02-23 14:43:01 KSQL 执行时间:4ms, ksql: UPDATE TM_Guides TM_Guides SET TM_Guides = :TM_Guides_new, TM_Guides.fBaseCountry = :fBaseCountry_new, TM_Guides.fGImages = :fGImages_new, TM_Guides.fName = :fName_new, TM_Guides.fSex = :fSex_new, TM_Guides.version = :version + 1 WHERE TM_Guides= :TM_Guides_old AND TM_Guides.version = :version_old 2016-02-23 14:43:01 excute stream action, params:{"actions":[{"accept":"application/json","action":"saveTM_GuidesAction","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"table":{"@type":"table","rows":[{"fBaseCountry":{"changed":1,"value":"伦敦"},"fDOB":{"changed":0},"fEmail":{"changed":0},"fGImages":{"changed":1,"value":"[]"},"fGRemark":{"changed":0},"fIDNo":{"changed":0},"fName":{"changed":1,"value":"导游一"},"fNativePlace":{"changed":0},"fPhone":{"changed":0},"fQQ":{"changed":0},"fSex":{"changed":1,"value":"男"},"userdata":{"id":{"changed":1,"value":"4121F179316C47DCBC0D7AE116C8B5AB"},"isModified":true,"recordState":"edit"},"version":{"changed":0,"value":10}}],"userdata":{"idColumnDefine":"TM_Guides","idColumnName":"TM_Guides","idColumnType":"String","model":"/TMS/commgt/data","relationAlias":"fBaseCountry,fDOB,fEmail,fGImages,fGRemark,fIDNo,fName,fNativePlace,fPhone,fQQ,fSex,version","relationTypes":"String,Date,String,String,String,String,String,String,String,String,String,Integer","relations":"TM_Guides.fBaseCountry,TM_Guides.fDOB,TM_Guides.fEmail,TM_Guides.fGImages,TM_Guides.fGRemark,TM_Guides.fIDNo,TM_Guides.fName,TM_Guides.fNativePlace,TM_Guides.fPhone,TM_Guides.fQQ,TM_Guides.fSex,TM_Guides.version","updateMode":"whereVersion"}}},"process":"/TMS/commgt/process/guides/guidesProcess"},{"accept":"application/json","action":"saveAttachAction","actionFlag":"__action_1__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"changeLog":"{\"items\":[],\"createVersionLogs\":[],\"operate\":\"saveDoc\",\"url\":\"\",\"process\":\"/TMS/commgt/process/guides/guidesProcess\",\"activity\":\"mainActivity\",\"isHttps\":false}","isSaveDocLink":false},"process":"/SA/doc/system/systemProcess"}]} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.justep.system.action.Engine.invokeActions(Native Method) at com.justep.system.action.Engine.invokeActions(Unknown Source) at com.justep.business.server.BusinessServer.doAction(Unknown Source) at com.justep.business.server.BusinessServer.doExcute(Unknown Source) at com.justep.business.server.BusinessServer.excute(Unknown Source) at com.justep.business.server.BusinessServer.excute(Unknown Source) at com.justep.business.server.BusinessServerServlet.execService(Unknown Source) at com.justep.business.server.BusinessServerServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at com.justep.x.bs.BusinessServerServlet.service(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745) Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150186; 提示: 更新记录TM_Guides, TM_Guides, key="4121F179316C47DCBC0D7AE116C8B5AB"出错, 不存在符合条件的数据, UPDATE TM_Guides TM_Guides SET TM_Guides = :TM_Guides_new, TM_Guides.fBaseCountry = :fBaseCountry_new, TM_Guides.fGImages = :fGImages_new, TM_Guides.fName = :fName_new, TM_Guides.fSex = :fSex_new, TM_Guides.version = :version + 1 WHERE TM_Guides= :TM_Guides_old AND TM_Guides.version = :version_old; 可能的原因: 数据被其他用户修改了; 数据被其他用户删除了 at com.justep.exception.BusinessException.create(Unknown Source) at com.justep.system.data.impl.TableImpl.edit(Unknown Source) at com.justep.system.data.impl.TableImpl.save(Unknown Source) at com.justep.system.data.impl.TableImpl.save(Unknown Source) at com.justep.system.data.BizData.save(Unknown Source) at BizProcedure.save(BizProcedure.java:143)
... 27 more
请问是不是我的写法不对?应该如何在弹出页面进行数据保存呢?
|