Home > Java > javaTutorial > body text

JAVAEE--contact addition, list display and modification functions

巴扎黑
Release: 2017-07-20 13:18:32
Original
2193 people have browsed it

Author: kentpeng

Please indicate the source for reprinting:

1. Add contact person

 1. Add page design

 

 linkman/list.jsp:

<input type="button" value="选择客户" onclick="window.open(&#39;${pageContext.request.contextPath}/CustomerAction_list?select=true&#39;,&#39;&#39;,&#39;width=600,height=300&#39;)" />
Copy after login

 coustomer/list.jsp

    function selectCustomer(cust_id,cust_name){//获得添加页面的window对象var win = window.opener;//获得添加页面的document对象var doc = win.document;//获得隐藏域,和 文本框,并赋值doc.getElementById("cust_id").value=cust_id;
        doc.getElementById("cust_name").value=cust_name;//关闭当前窗口        window.close();
        
    };
Copy after login
    <s:if test="#parameters.select==null"><a href="${pageContext.request.contextPath }/CustomerAction_toEdit?cust_id=<s:property value="#cust.cust_id" />">修改</a>  <a href="${pageContext.request.contextPath }/customerServlet?method=delete&custId=${customer.cust_id}">删除</a></s:if><s:else><input type="button" value="选择" onclick="selectCustomer(<s:property value="#cust.cust_id" />,'<s:property value="#cust.cust_name" />')" /></s:else>
Copy after login

2. Add customers

 

2. Contact list

Complete according to the customer list ( Copy)

3. Contact modification

Note: The backend uses the same method to complete the add and update functions

The above is the detailed content of JAVAEE--contact addition, list display and modification functions. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!