//jsp A
<c:forEach var="user" items="${users}">
<tr>
<a href="userinfo.jsp?userId=${user.id}" >${user.name}</a></td>
</tr>
</c:forEach> //jsp B
怎样能显示
<c:forEach var="user" items="${users}">
<tr>
<a href="userinfo.jsp?userId=${user.id}" >${user.name}</a></td>
</tr>
</c:forEach> //jsp B
怎样能显示
解决方案 »
- 谁给我推进个好看的网站留言板html模板?
- 怎样设置多个tomcat使用同一个端口?
- 如何使hibernate根据外键来删除数据?
- 哪位高手给个struts上传图片保存到mssql中和显示的案例
- jsp中的javaBean中的class在使用时为什么直接定义就可以使用而不需要具体的事例化 与java相比
- java中类似chr的函数哪个类中?
- 求java报表控件资料
- 怎样从orcale中取出音乐类型数据,字名=showmusic 类型=(blob)??????
- 求救!!!!!TOMCAT问题!牛人帮忙啊!
- 关于activeX控件与各浏览器兼容问题。
- 为什么创建不了SessionFactory?
- java 问题 急急急
/**
* 显示人员详细信息
*/
function showUserDetail(userId) {
window.showModalDialog("<%=path %>/basicInfo/user/user!detail.action?userId=" + userId + "&d=" + new Date(), self, 'dialogHeight:600px;dialogWidth:600px;center:yes;middle:yes;help:no;location:no;status:no;scroll:yes');
}
页面:<td class="List_table_text"><a href="javascript:showUserDetail('${userInfo.userId}')"><c:out value="${userInfo.name}"/></a></td>后台:/**
* 根据用户ID查询员工详细
* @return
* @throws Exception
*/
public String detail() throws Exception {
userDetail = userService.getUserInfoById(userId);
return "detail";
}
详细页面:<div id="btn_title_area" style="width:95%;margin:10px auto 5px auto"><img src="<%=frameroot%>/image/icon_title.gif" align="absmiddle" /> 人员信息详细</div>
<input type="hidden" value="${userDetail.userId}" name="userId" id="userId">
<s:form id="mytable" theme="simple" name="mytable">
<table width="95%" border="0" cellpadding="0" cellspacing="0" align="center" class="table_list">
<tr>
<th style="width:25%">员工编号:</th>
<td colspan="3">
<c:out value="${userDetail.userNo}"></c:out>
</td>
</tr>
<tr>
<th>姓名:</th>
<td>
<c:out value="${userDetail.name}"></c:out>
</td>
</tr>
<tr>
<th style="width:20%">用户名:</th>
<td colspan="3">
<c:out value="${userDetail.userName}"></c:out>
</td>
</tr>
<tr>
<th>性别:</th>
<td>
<c:if test="${userDetail.sex == 1}">
<c:out value="女"/>
</c:if>
<c:if test="${userDetail.sex == 0}">
<c:out value="男"/>
</c:if>
</td>
</tr>
<tr>
<th>身份证号:</th>
<td>
<c:out value="${userDetail.identityId}"></c:out>
</td>
</tr>
<th>机构:</th>
<td>
<c:out value="${userDetail.org.departmentName}"></c:out>
</td>
</tr>
<th>部门:</th>
<td>
<c:out value="${userDetail.department.departmentName}"></c:out>
</td>
</tr>
<th>级别:</th>
<td>
<c:out value="${userDetail.level.masterValue}"></c:out>
</td>
</tr>
</tr>
<th>头衔:</th>
<td>
<c:out value="${userDetail.title.masterValue}"></c:out>
</td>
</tr>
<tr>
<th>是否有试用期:</th>
<td>
<c:choose>
<c:when test="${userDetail.isTry == 1}">是</c:when>
<c:otherwise>否</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>是否需印制名片:</th>
<td>
<c:choose>
<c:when test="${userDetail.isMakingCard == 1}">是</c:when>
<c:otherwise>否</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>入职时间:</th>
<td>
<fmt:formatDate pattern="yyyy-MM-dd" value="${userDetail.inCompanyTime}" ></fmt:formatDate>
</td>
</tr>
<tr>
<th>状态:</th>
<td>
<c:choose>
<c:when test="${userDetail.userState == 1}">有效</c:when>
<c:otherwise>无效</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<th>备注:</th>
<td>
<c:out value="${userDetail.res}"></c:out>
</td>
</tr>
</table>
<div id="btn_submit_area">
<input name="Submit2" type="button" class="btn_submit" value="关 闭" onclick="doCancel();">
</div>
</s:form>
</body>
</HTML>参考一下吧