转载请注明出处:
一、联系人添加
1.添加页面设计
linkman/list.jsp:
<input type="button" value="选择客户" onclick="window.open('${pageContext.request.contextPath}/CustomerAction_list?select=true','','width=600,height=300')" />
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(); };
<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>
2.添加客户
二、联系人列表
按照客户列表完成(抄)
三、联系人修改
注:后台使用同一个方法完成添加和更新功能
以上就是JAVAEE--联系人添加、列表显示和修改功能的详细内容,更多请关注php中文网其它相关文章!
![php中文网最新课程二维码](/static/images/article_wechat2021.jpg?1111)
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论