In spring zqbp, this controller requires a parameter for dept, but which step is to pass the parameters?

120 2

<% @ page import ="com. Qdzq. Zzpt. Vo. Page"%&gt.
<% @ 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").
    %>

<div class ="pagecontent">

<form method="post"
 action="<%=basePath%>admin/dept/edit.html?navTabId=dept"
 class="pageForm required-validate"
 onsubmit="return validateCallback(this, navTabAjaxDone);">
 <div 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>.

</div>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""">""""""""
This is controller!!!!
Public modelandview edit ( httpservletrequest, HttpServletResponse response, zqbp_dept item )

1 Answers

101 1

Input name is value is in the item. It's ok.

...