<%@page import="com.qdzq.zzpt.vo.Page"%>
<%@ page language="java" import="java.util.,com.qdzq.zqbp.entity."
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
request.getServerName() + ":" + request.getServerPort()
path + "/";
//Page<zqbp_dept_person> p //= (Page<zqbp_dept_person>) request.getAttribute("page");
zqbp_dept dp=(zqbp_dept)request.getAttribute("dp");
Page<zqbp_person> p=(Page<zqbp_person>)request.getAttribute("per");
Page<zqbp_system> p2=(Page<zqbp_system>)request.getAttribute("sys");
%>
<p class="pageContent">
<form method="post"
action="<%=basePath%>admin/dept/edit.html?navTabId=dept"
class="pageForm required-validate"
onsubmit="return validateCallback(this, navTabAjaxDone);">
<p class="pageFormContent" layoutH="56">
<p>
<label>部门:</label> <select name="dept_sys_id" id="dept_sys_id" style="width:180px">
<%
for (zqbp_system one: p2.getList()) {
%>
<option value=<%=one.getSystem_id()%>
<% if(one.getSystem_id().equals(dp.getDept_sys_id())){%>
selected="selected"
<% }%>
<%=one.getSystem_name()%></option>
<% } %> </select> </p> <p> <label>部门负责人:</label><select name="dept_person_id" id="dept_person_id" style="width:180px"> <% for (zqbp_person one: p.getList()) { %> <option value=<%=one.getPerson_id()%> <% if(one.getPerson_id().equals(dp.getDept_person_id())){%> selected="selected" <% }%>
<%=one.getPerson_name()%></option>
</p>
《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《
这是controller!!!!
public ModelAndView edit(HttpServletRequest request,HttpServletResponse response, zqbp_dept item)
input的name 的值在item中有对应的就可以了