我在父页面中用window.showModalDialog打开子窗口, 当保存时成功时, struts2会刷新子页面, 在IE中会出错, 说不支持, 然后就谈出另外一个页面了, 我在Firefox中测试是可以的, 不知道为什么?

解决方案 »

  1.   

    上面的错误, 在struts.xml配置如下:
    <action name="addDept" class="deptWithUserAction" method="addDept">
      <result name="success" type="dispatcher">
        <param name="location">newDeptPop.jsp</param>
      </result>
    </action>
    在action中代码如下:
    public String addDept() throws Exception {
    Department dept = new Department();
    long compid = new Long(ActionContext.getContext().getSession().get("compid").toString());
    long userid = new Long(ActionContext.getContext().getSession().get("userid").toString());
    int cnt = 0;

    dept.setCompany("");
    dept.setCompID(compid);
    dept.setDeptName(getpopdept());
    dept.setMemo("");
    dept.setStatus("A");
    dept.setUpdDt(util.getCurrent());
    dept.setUpdUsr(userid);

    cnt = getAuthService().setDepartment(dept, "I");
    if (cnt > 0) {
    return "success";
    }
    else {
    this.addFieldError("error", "新增部门时, 发生了错误!");
    return "error";
    }
    }
    我在FF中是没有一点问题的, 在IE中保存成功后, 刷新时会提示错误.
      

  2.   

    你JSP怎么写的,还有就是错误是什么呢