|
本帖最后由 liaogen1984 于 2013-4-9 10:45 编辑
我在Action定义的KSQL如下:
select COMPAREVIEW.FNO as FNO,COMPAREVIEW.VERSION as VERSION,COMPAREVIEW.FNAME as FNAME,COMPAREVIEW.FCOMPANY as FCOMPANY,COMPAREVIEW.FPLACE as FPLACE,COMPAREVIEW.SBU as SBU,COMPAREVIEW.FCODE as FCODE,COMPAREVIEW.VERSION1 as VERSION1,COMPAREVIEW.FSTU as FSTU,COMPAREVIEW.FFACTORY as FFACTORY,COMPAREVIEW.FBIRTH as FBIRTH,COMPAREVIEW.SBU1 as SBU1,COMPAREVIEW.COMPARERESULT as COMPARERESULT
from COMPAREVIEW COMPAREVIEW
where COMPAREVIEW.SBU = :p
就是说where条件里的参数p从外部页面的参数取值。
然后我在主页面中的某一表格写了批注:
html:<a model="dialog" href="/x5demo/basedemo/process/mingxi/mainActivity.w?SBUName=$SBU&process='/x5demo/basedemo/process/mingxi/mingxiProcess'&activity='mainActivity'" title="{$SBU}-差异比对明细表"/>
表示向/x5demo/basedemo/process/mingxi/mainActivity.w?文件将参数SBUName传送过去,而调用此Action的/x5demo/basedemo/process/mingxi/mainActivity.w?文件中写了如下JS脚本:
var mainActivity = {};
mainActivity.mdDefaultLoad = function(event){
var sbuName = justep.Context.getRequestParameter("SBUName");
justep.xbl('ds1').setStringVar('p',sbuName);
justep.xbl('grdMain').refresh();
};
之后运行主页面
选择一个链接,将该链接的数值作为参数SBUName传送过去,报错:
2013-04-09 10:34:49 excute Action error:<?xml version="1.0" encoding="UTF-8"?>
<action direct-execute="true" process="/x5demo/basedemo/process/mingxi/mingxiProcess" activity="mainActivity" action-flag="__action_0__" executor="PSN01" execute-context="" name="queryCOMPAREVIEWAction"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="variables"><xbiz:map/></parameter><parameter name="offset"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#Integer">0</xbiz:simple></parameter><parameter name="limit"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#Integer">20</xbiz:simple></parameter><parameter name="columns"><xbiz:simple type="[tr]http://www.w3.org/2001/XMLSchema#String"><![CDATA[VERSION,FNAME,FCOMPANY,FPLACE,SBU,FCODE,VERSION1,FSTU,FFACTORY,FBIRTH,SBU1,COMPARERESULT,FNO]]></xbiz:simple></parameter></parameters><translate-parameter data-type="row-list" transform-idcolumn="true" use-namespace="true" cellname-by-relation="false"><rows-config concept="COMPAREVIEW" sequence="FNO,FNAME,FCOMPANY,FPLACE,SBU,FCODE,FSTU,FFACTORY,FBIRTH,COMPARERESULT,VERSION,VERSION1,SBU1"/></translate-parameter></action>
com.justep.model.exception.ModelException: java.lang.reflect.InvocationTargetException
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.BusinessServerServlet.execService(Unknown Source)
at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.justep.system.action.Engine.invokeActions(Native Method)
... 21 more
Caused by: com.justep.model.exception.ModelException: 执行ksql:SELECT COMPAREVIEW.FNO as FNO,COMPAREVIEW.VERSION as VERSION,COMPAREVIEW.FNAME as FNAME,COMPAREVIEW.FCOMPANY as FCOMPANY,COMPAREVIEW.FPLACE as FPLACE,COMPAREVIEW.SBU as SBU,COMPAREVIEW.FCODE as FCODE,COMPAREVIEW.VERSION1 as VERSION1,COMPAREVIEW.FSTU as FSTU,COMPAREVIEW.FFACTORY as FFACTORY,COMPAREVIEW.FBIRTH as FBIRTH,COMPAREVIEW.SBU1 as SBU1,COMPAREVIEW.COMPARERESULT as COMPARERESULT FROM COMPAREVIEW COMPAREVIEW WHERE (COMPAREVIEW.SBU = :p) LIMIT 0, 20时出错!
at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
at com.justep.system.data.BizData.query(Unknown Source)
at BizProcedure.query(BizProcedure.java:12)
... 26 more
Caused by: com.justep.model.exception.ModelException: 找不到变量:p对应的值!
at com.justep.util.Utils.check(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.VariableNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.CompExpressionNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.WhereNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.SelectSentenceNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.QueryVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.QuerySentence.accept(Unknown Source)
... 31 more
Action我的配置如下图:
|
-
|