我觉得javascript也可以实现啊,通过js提交表单到action
//jsp页面javascript
function gotoAction(){
var opts = document.getElementById("department").options;
for(var i = 0; i<opts.length;i++) {
if(opts[i].selected) {
document.location = "/hms/operator.do?method=getOperatorById&departmentId="+opts[i].value;
return;
}
}
public ActionForward getOperatorById(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
//动态表单
DynaActionForm roleForm = (DynaActionForm) form;
//获得部门id
int id = (Integer) roleForm.get("departmentId");
//设置该部门员工(分页)
request.getSession().setAttribute("pageBean", operatorBiz
.getOperatorByDepartmentId(id));
//跳转回该页面(struts-config.xml)
return mapping.findForward("setting");
}
不过感觉和你的两个下拉框有点不合适!呵呵~
[[it] 本帖最后由 kevin87 于 2008-11-19 14:11 编辑 [/it]]