我的js是这样的
<script type="text/javascript">
function getCommentInfo(){
commentdao.findComment(getResult);
} function getResult(data){
DWRUtil.removeAllRows("mybody");
DWRUtil.addRows("mybody",data,dataCell);
} var dataCell = [
function(commentVO) {
return "标题:"+commentVO.commentTitle;},
function(commentVO) {
return "评论:"+commentVO.comment;},
function(commentVO) {
return "时间:"+commentVO.time;}
]; function addCommentInfo() {
var com = new commentVO();
com.commentContent=DWRUtil.getValue("comment");
com.commentTitle=DWRUtil.getValue("commenttitle");
alert(com.commentContent);
commentdao.addComment(com,getAddResult());
alert("...");
} function getAddResult(date){
alert("发表留言成功!");
getCommentInfo();
}
</script> dwr.xml
<dwr>
<allow>
<create creator="new" javascript="commentdao">
<param name="class" value="cn.com.qz.dao.impl.UserDAOImpl">
<include method="findComment"/>
<include method="addComment"/>
</param>
</create>
<convert match="cn.com.qz.vo.CommentVO" javascript="commentVO" converter="bean">
</convert>
</allow>
</dwr> ..................................
commentdao.addComment(com,getAddResult());在这里的时候报错,
2009-05-06 13:51:30,265 WARN (http-8888-Processor23) [org.directwebremoting.dwrp.BaseCallMarshaller] - Marshalling exception: Missing method or missing parameter converters
2009-05-06 13:51:30,265 WARN (http-8888-Processor23) [org.directwebremoting.dwrp.BaseCallMarshaller] - --Erroring: batchId[2] message[java.lang.IllegalArgumentException: Missing method or missing parameter converters]
大家能不能帮我分析下。谢谢了
<script type="text/javascript">
function getCommentInfo(){
commentdao.findComment(getResult);
} function getResult(data){
DWRUtil.removeAllRows("mybody");
DWRUtil.addRows("mybody",data,dataCell);
} var dataCell = [
function(commentVO) {
return "标题:"+commentVO.commentTitle;},
function(commentVO) {
return "评论:"+commentVO.comment;},
function(commentVO) {
return "时间:"+commentVO.time;}
]; function addCommentInfo() {
var com = new commentVO();
com.commentContent=DWRUtil.getValue("comment");
com.commentTitle=DWRUtil.getValue("commenttitle");
alert(com.commentContent);
commentdao.addComment(com,getAddResult());
alert("...");
} function getAddResult(date){
alert("发表留言成功!");
getCommentInfo();
}
</script> dwr.xml
<dwr>
<allow>
<create creator="new" javascript="commentdao">
<param name="class" value="cn.com.qz.dao.impl.UserDAOImpl">
<include method="findComment"/>
<include method="addComment"/>
</param>
</create>
<convert match="cn.com.qz.vo.CommentVO" javascript="commentVO" converter="bean">
</convert>
</allow>
</dwr> ..................................
commentdao.addComment(com,getAddResult());在这里的时候报错,
2009-05-06 13:51:30,265 WARN (http-8888-Processor23) [org.directwebremoting.dwrp.BaseCallMarshaller] - Marshalling exception: Missing method or missing parameter converters
2009-05-06 13:51:30,265 WARN (http-8888-Processor23) [org.directwebremoting.dwrp.BaseCallMarshaller] - --Erroring: batchId[2] message[java.lang.IllegalArgumentException: Missing method or missing parameter converters]
大家能不能帮我分析下。谢谢了
错误:参数转换错误导致的运行时异常
解决办法:检查下<convert>节点里的match属性,匹配的应该是数组里每个元素的类型.