javascript报错:
对象不支持此属性或方法
sal_chanceDWR.delAll(ids);function deleteAll() {
var choices = window.document.getElementsByName("checks");
var count = 0;
var ids = [];
for (var i = 0; i < choices.length; i++) {
if (choices[i].checked == true) {
count = count + 1;
}
}
if (count > 0) {
if (window.confirm("\u4f60\u662f\u5426\u8981\u5220\u9664" + count + " \u884c")) {
for (var i = 0; i < choices.length; i++) {
if (choices[i].checked == true) {
ids[i] = choices[i].value;
}
}
//调用方法将id数组传过去
//后台写入数据库,一次提交
              dwr.engine.beginBatch();
              DWREngine.setAsync(false);
sal_chanceDWR.delAll(ids);
DWREngine.setAsync(true);
init();
dwr.engine.endBatch();
}
} else {
alert("\u4f60\u8fd8\u672a\u9009\u62e9");
}
}
dwr配置:
<create creator="spring" javascript="sal_chanceDWR">
<param name="beanName" value="salBizImpl" />
<include method="del" />
<include method="putPageSal_chanceTypeToRequestScope" />
<include method="saveNewSal_chance" />
<include method="updateSal_chance" />
<include method="getUser" />
<include method="delAll" />
</create>方法:(主要问题是也没跳进这个方法)
//批量删除,id集合
public void delAll(String[] ids) {
for (int i = 0; i < ids.length; i++) {
Sal_chance sal_chance = new Sal_chance();
Long[] intIds = null;
intIds[i] = Long.parseLong( ids[i]);
sal_chance.setChcId(intIds[i]);
this.del(sal_chance);
}
}

解决方案 »

  1.   

    你这是dwr吧。那你先得设置为debug模式,然后通过测试你的影射出来的方法是不是正确的。
      

  2.   

    debug模式?就是进入dwr网页那个吗?我测试过了,确实不行呢。
      

  3.   

    对你的要先dwr测试一下,看是不是返回正确的值了,还就是看看你的js和dwr的包啊,有没有全,
      

  4.   


    其他的dwr就可以哦,dwr测试这个怎么说呢,就是方法都进不了呢