|
楼主 |
发表于 2017-3-17 11:07:26
|
显示全部楼层
本帖最后由 波斯大香蕉 于 2017-3-17 11:32 编辑
在action添加了一个public --- sData1 --- String 这样的参数。JS代码如下:
Model.prototype.button5Click = function(event) {
var dList = this.comp("mainData");
var sData1 = dList.getCurrentRowID();
// 定义action参数,请求taskDataAction获取当前环节的数据信息
var param = new biz.Request.ActionParam();
var taskRows = "";
console.log(sData1);
console.log(this.getContext());
param.setString("sData1", sData1);
biz.Request.sendBizRequest({
"context" : this.getContext(),
"action" : "taskData",
"parameters" : param,
"callback" : function(callbackData) {
if (callbackData.state) {
taskRows = callbackData.response.rows;
console.log(taskRows);
} else
alert("任务数据获取失败");
}
});
// 当有数据返回时获取第一条的信息进行处理
if (taskRows.length > 0) {
var title = taskRows[0].sActivityName.value;// 获得当前环节名称,作为页面的标题
var taskID = taskRows[0].task.value;// 获得任务ID,url中的参数
var url = taskRows[0].sEURL.value;// 获得当前环节的url
url = url + "?task=" + taskID + "&_pagePattern=write";// _pagePattern=write是必须的,表示要处理这个任务
justep.Shell.showPage({
url : url,
title : title
}); // 调用justep.Shell.showPage方法打开流程当前环节对应的w文件
} else {
alert("流转未启动、已完成、或者应由其他人处理");
}
};
执行报错如下:
2017-03-17 11:03:46 excute stream action, params:{"accept":"application/json","action":"taskData","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"sData1":"0900304B15EE42B999E9209D0FCB6A39"},"process":"/apply/apply/process/apply/applyProcess"}
java.lang.IllegalArgumentException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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)
|
|