34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
<%@page import="com.amarsoft.are.jbo.*"%><%@
|
||
page contentType="text/html; charset=GBK"%><%@
|
||
include file="/IncludeBeginMDAJAX.jsp"%><%
|
||
String sClassName = CurPage.getParameter("ClassName");
|
||
String sMethodName = CurPage.getParameter("MethodName");
|
||
String sArgs = CurPage.getParameter("Args");
|
||
|
||
//¸ù¾ÝmethodTypeÀ´È·¶¨´«ÈëµÄ²ÎÊý
|
||
BizObject methodBo = JBOFactory.getBizObjectManager("jbo.sys.CLASS_METHOD")
|
||
.createQuery("select methodType from O where ClassName=:ClassName and MethodName=:MethodName ")
|
||
.setParameter("ClassName", sClassName).setParameter("MethodName", sMethodName).getSingleResult(false);
|
||
if(methodBo!=null){
|
||
String methodType = methodBo.getAttribute("methodType").getString();
|
||
ASMethod method = null;
|
||
JBOTransaction tx = null;
|
||
try{
|
||
if("JBOQL".equalsIgnoreCase(methodType) || "JBOBizlet".equalsIgnoreCase(methodType)){
|
||
tx = JBOFactory.createJBOTransaction();
|
||
method = new ASMethod(sClassName,sMethodName,tx);
|
||
}else{
|
||
method = new ASMethod(sClassName,sMethodName,Sqlca);
|
||
}
|
||
Any anyValue = method.execute(sArgs);
|
||
if(anyValue==null){
|
||
out.print("");
|
||
}else{
|
||
out.print(anyValue.toStringValue());
|
||
}
|
||
if(tx!=null) tx.commit();
|
||
}catch(Exception e){
|
||
if(tx!=null) tx.rollback();
|
||
}
|
||
}
|
||
%><%@ include file="/IncludeEndAJAX.jsp"%> |