Fwd: hi michael 问你个buffalo的问题 from Charles Lin

3 views
Skip to first unread message

Michael Chen

unread,
Sep 23, 2008, 1:42:45 AM9/23/08
to am...@googlegroups.com
---------- Forwarded message ----------
From: charles lin <linz...@gmail.com>
Date: 2008/9/21
Subject: hi michael 问你个buffalo的问题 from Charles Lin
To: mech...@gmail.com


hi michael 我在使用buffalo过程中遇到一个问题

function getSapAuditError(poID){
try{
var returnValue;
buffalo.remoteCall("IndentOrderService.getCurrentRejectList",[poID],
function(reply){
if(reply.getResult()==null)
retunValue = "1";
else
{
var rList = reply.getResult();
var rReason = rList[0].rejectReason;
if(rReason.indexOf("订单创建出错")==-1&&rReason.indexOf("冻结删除标志")==-1)
returnValue = "1";
else
returnValue = "0";
}
});
return returnValue;
}catch(e){
alert(e.getMessage());
}
}


其中远程调用的方法如下:

public List getCurrentRejectList(String poAppNo) throws IndentException {
try {
return indentOrderDAO.getCurrentRejectList(poAppNo);
} catch (IndentException e) {
if (log.isDebugEnabled()) {
log.error("获取审核不通过原因列表失败!", e);
}
throw new IndentException("获取审核不通过原因列表失败!", e);
}
}

远程调用返回的list有可能是空的

我需要在 if(reply.getResult()==null)
retunValue = "1";
这段代码做一个判断 ,即如果远程调用的方法调用返回的是空值 则 retunValue = "1";

但以上面的写法老是报错 (对象不支持此属性或方法)

期望得到你的指点 谢谢你!


--
Michael Chen
--------------------------------
Blog: http://michael.nona.name
MSN: jzch...@hotmail.com

Reply all
Reply to author
Forward
0 new messages