jsp页面动态展示list-使用&lt;select&gt;和<c>标签

本文介绍了一种Java后台处理数据并将其传递给前端进行展示的方法,包括使用List存储数据、枚举类型转换为Map及前端页面的实现。

后台:搜索数据放入list,然后为这个list提供响应的get和set方法

private List<String> l=new ArrayList<String>();
public List<String> getL() {
		return l;
	}

	public void setL(List<String> l) {
		this.l = l;
	}	
//给list赋值的方法,增加一个默认值:请选择,这样下拉列表展现出来的数据好看些
public String configUI(){
		//查询所有的车险渠道来源以及名称,放到list然后传递到前台-channelnamelist
		l.add("请选择");
		l.addAll(Service.getChannelname());
		return "configUI";
	}


前台接受

渠道来源:<select id="channelname" name="channelname" cssClass="input4">
		<c:forEach var="value" items="${L}">
		<option value="${value}">
		${value}
		</option>
		</c:forEach>
		</select>
		</span>

 

效果图

 

+20160706+

如果是list中是对象呢?

+20190301+

如果是枚举类型呢?

将枚举转化为map

<select class="select" size="1" style="width: 100%;"name="merchantStatus" id="merchantStatus" required>
<c:forEach var="value" items="${merchantStatusMap}">
<option value="${value.key}">
        ${value.value}
</option>
</c:forEach>
</select>

如果还有默认值,则增加一个判断

<select class="select" size="1" style="width: 100%;"name="merchantType" id="merchantType" required>
 <c:forEach var="value" items="${merchantTypeMap}">
	<c:choose>
		<c:when test="${m.merchantType==value.key}">
			<option value="${value.key}" selected="true">
				${value.value}
			</option>
		</c:when>
		<c:otherwise>
			<option value="${value.key}">
				${value.value}
			</option>
		</c:otherwise>
		</c:choose>
	</c:forEach>
</select>

+20190313+c:forEach checkbox

页面选项-后端提供可选项

<c:forEach items="${theMap}" var="value">
	<lable><input name="theType" type="checkbox" value="${value.key}" />${value.value.desc}</lable>
</c:forEach>

查看页面-后端提供已选项与可选项-不可修改checkbox

<c:forEach items="${theMap}" var="value">
	<lable><input name="theType" type="checkbox" value="${value.key}"
			<c:forEach items="${theMapCheckBox}" var="v2">
					<c:if test="${v2==value.key}"> checked="true" </c:if>
			</c:forEach>
			onclick="return false" />${value.value.desc}</lable>
</c:forEach>

编辑页面

<c:forEach items="${theMap}" var="value">
	<lable><input name="theType" type="checkbox" value="${value.key}"
			<c:forEach items="${theMapCheckBox}" var="v2">
					<c:if test="${v2==value.key}"> checked="true" </c:if>
			</c:forEach>
			onclick="return false" />${value.value.desc}</lable>
</c:forEach>

 

 

 

 

 

&lt;%@ page import="util.DbConnet" %> &lt;%@ page import="java.sql.ResultSet" %> &lt;%@ page contentType="text/html;charset=UTF-8" language="java" %> &lt;% //获取用户输入的查询内容 String appliance_id = request.getParameter("appliance_id"); if(appliance_id==null) appliance_id=""; String appliance_type = request.getParameter("appliance_type"); if(appliance_type==null) appliance_type=""; String appliance_name = request.getParameter("appliance_name"); if(appliance_name==null) appliance_name=""; //1.数据总数 String sql = "select count(*) as total from `living_room_appliances` " + "where `appliance_id` like ? and `appliance_type` like ? and `appliance_name` like ?;"; Object[] params = new Object[]{ "%"+appliance_id+"%","%"+appliance_type+"%","%"+appliance_name+"%" }; ResultSet rs = DbConnet.select(sql, params); rs.next(); int total = rs.getInt("total"); //2.每页显示的行数 int pageSize = 5; //3.总页数 double result = (double)total/pageSize; //向上取整:只要数值带有有效的小数,舍去小数,整数位加一 int pageTotal = (int) Math.ceil(result); //4.当前页码 String pageNoStr = request.getParameter("pageNo"); pageNoStr = pageNoStr==null?"1":pageNoStr; int pageNo = Integer.parseInt(pageNoStr); //获取用户表中的数据,显示出来 sql = "select * from `living_room_appliances` " + "where `appliance_id` like ? and `appliance_type` like ? and `appliance_name` like ?" + "limit ?,?;"; int start = (pageNo - 1) * pageSize;//(当前页码-1)*每页显示的行数 params = new Object[]{ "%"+appliance_id+"%","%"+appliance_type+"%","%"+appliance_name+"%",start,pageSize }; rs = DbConnet.select(sql, params); %> &lt;html> &lt;head> &lt;title>用户列表&lt;/title> &lt;link rel="stylesheet" href="../css/common.css"> &lt;link rel="stylesheet" href="../css/list.css"> &lt;/head> &lt;body> &lt;%--搜索区域 S--%> &lt;div class="search"> &lt;form> &lt;label for="appliance_id">账号:&lt;/label> &lt;input type="text" id="appliance_id" name="appliance_id" value="&lt;%=appliance_id%>"> &lt;label for="appliance_type">姓名:&lt;/label> &lt;input type="text" id="appliance_type" name="appliance_type" value="&lt;%=appliance_type%>"> &lt;label for="appliance_name">姓名:&lt;/label> &lt;input type="text" id="appliance_name" name="appliance_name" value="&lt;%=appliance_name%>"> &lt;button id="btnSearch" class="primary" type="button">查询&lt;/button> &lt;button id="btnReset" type="button">重置&lt;/button> &lt;/form> &lt;/div> &lt;%--搜索区域 E--%> &lt;%--按钮区域 S--%> &lt;div class="btn-box"> &lt;button id="btnAdd" class="primary" type="button">新增&lt;/button> &lt;/div> &lt;%--按钮区域 E--%> &lt;%--表格区域 S--%> &lt;div class="table-box"> &lt;table> &lt;tr> &lt;th>编号&lt;/th> &lt;th>账号&lt;/th> &lt;th>姓名&lt;/th> &lt;th>操作&lt;/th> &lt;/tr> &lt;% while (rs.next()){ %> &lt;tr> &lt;td>&lt;%=rs.getString("appliance_id")%>&lt;/td> &lt;td>&lt;%=rs.getString("appliance_type")%>&lt;/td> &lt;td>&lt;%=rs.getString("appliance_name")%>&lt;/td> &lt;td> &lt;button data-id="&lt;%=rs.getString("id")%>" name="btnEdit" class="primary" type="button">编辑&lt;/button> &lt;button data-id="&lt;%=rs.getString("id")%>" name="btnDelete" class="danger" type="button">删除&lt;/button> &lt;/td> &lt;/tr> &lt;% } %> &lt;/table> &lt;/div> &lt;%--表格区域 E--%> &lt;%--页码区域 S--%> &lt;%--&lt;div class="pager">--%> &lt;%-- &lt;ul>--%> &lt;%-- &lt;li>共&lt;%=total%>条数据/每页&lt;%=pageSize%>条&lt;/li>--%> &lt;%-- &lt;% if(pageNo>1){%>--%> &lt;%-- &lt;li class="page">&lt;a href="list.jsp?username=&lt;%=username%>&realname=&lt;%=realname%>&pageNo=1">首页&lt;/a>&lt;/li>--%> &lt;%-- &lt;li class="page">&lt;a href="list.jsp?username=&lt;%=username%>&realname=&lt;%=realname%>&appliance_name&lt;%appliance_name%>&pageNo=&lt;%=pageNo-1%>">上一页&lt;/a>&lt;/li>--%> &lt;%-- &lt;% } %>--%> &lt;%-- &lt;%– &lt;li class="active">1&lt;/li>–%>--%> &lt;%-- &lt;% for (int i=1;i&lt;=pageTotal;i++){%>--%> &lt;%-- &lt;li class="&lt;%=(pageNo==i?"active":"")%>" class="page">--%> &lt;%-- &lt;a href="list.jsp?username=&lt;%=username%>&realname=&lt;%=realname%>&pageNo=&lt;%=i%>">&lt;%=i%>&lt;/a>--%> &lt;%-- &lt;/li>--%> &lt;%-- &lt;% } %>--%> &lt;%-- &lt;% if(pageTotal>pageNo){%>--%> &lt;%-- &lt;li class="page">&lt;a href="list.jsp?username=&lt;%=username%>&realname=&lt;%=realname%>&pageNo=&lt;%=pageNo+1%>">下一页&lt;/a>&lt;/li>--%> &lt;%-- &lt;li class="page">&lt;a href="list.jsp?username=&lt;%=username%>&realname=&lt;%=realname%>&pageNo=&lt;%=pageTotal%>">尾页&lt;/a>&lt;/li>--%> &lt;%-- &lt;% } %>--%> &lt;%-- &lt;/ul>--%> &lt;%--&lt;/div>--%> &lt;%--页码区域 E--%> &lt;script src="../js/jquery-3.5.1.min.js">&lt;/script> &lt;script src="../js/common.js">&lt;/script> &lt;script> //绑定搜索按钮的点击事件 $('#btnSearch').on('click', function () { //获取搜索框中的内容:账号、姓名 let username = $('#username').val(); let realname = $('#realname').val(); window.location.href="list.jsp?username=" + username + "&realname=" + realname; }); //绑定重置按钮的点击事件 $('#btnReset').on('click', function () { window.location.href="list.jsp"; }); //绑定新增按钮的点击事件 $('#btnAdd').on('click', function () { window.location.href="add.jsp"; }); //绑定行内的编辑按钮点击事件 $('button[name=btnEdit]').on('click', function () { let id = $(this).attr('data-id');//从当前点击的按钮身上获取data-id的值 window.location.href = 'edit.jsp?id='+id; }); //绑定行内的删除按钮点击事件 $('button[name=btnDelete]').on('click', function () { if(confirm("确定要删除吗?")) { //获取删除按钮所在行的编号(id) let id = $(this).attr('data-id');//从当前点击的按钮身上获取data-id的值 //无刷新方式提交删除请求 postAction('/user/delete', {id: id}, function (res) { alert(res.msg); if (res.result) window.location.href = res.url; }); } }); &lt;/script> &lt;/body> &lt;/html> 请修改这些代码的错误
07-06
&lt;tr> &lt;td>Status:&lt;/td> &lt;td colspan="3" style="text-align: left;">&lt;select name="status"> &lt;option value="KITTING" selected="selected">KITTING&lt;/option> &lt;/select&gt;&lt;/td> &lt;/tr> &lt;tr> &lt;td>FabSite:&lt;/td> &lt;td colspan="3" style="text-align: left;">&lt;select name="fab"> &lt;option value="J2A DOI" selected="selected">DOI&lt;/option> &lt;/select&gt;&lt;/td> &lt;/tr> 明明有值,为什么 String lotId = FormatUtils.parseString(request.getParameter("lotId")); String rackId = FormatUtils.parseString(request.getParameter("rackId")); String status = FormatUtils.parseString(request.getParameter("status")); String fab = FormatUtils.parseString(request.getParameter("fab")); int pageSize = LineSideConstants.PAGE_SIZE_10; Integer pageIndex = FormatUtils.parseInteger(request.getParameter("pageIndex")); if (pageIndex == null) { pageIndex = 0; } RmsBinLotDetail rmsBinLotDetail = new RmsBinLotDetail(); rmsBinLotDetail.setLotId(lotId.trim()); rmsBinLotDetail.setCabinetId(rackId.trim()); rmsBinLotDetail.setStatus(status.trim()); rmsBinLotDetail.setFabsite(fab.trim()); 这两个还是空值? rmsBinLotDetail.setStatus(status.trim()); rmsBinLotDetail.setFabsite(fab.trim()); 完整代码如下: &lt;%@page import="com.sjsemi.lsmm.domain.RmsBinLotDetail" %> &lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> &lt;%@ page import="java.util.*" %> &lt;%@page import="com.sjsemi.lsmm.service.RmsService" %> &lt;%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %> &lt;%@ page import="org.springframework.context.ApplicationContext" %> &lt;%@ page import="com.sjsemi.lsmm.common.LineSideConstants" %> &lt;%@ page import="com.sjsemi.prms.domain.PagerResult" %> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> &lt;html> &lt;head> &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> &lt;title>&lt;%=Global.WEB_TITLE %> &lt;/title> &lt;% request.setCharacterEncoding("UTF-8"); %> &lt;meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"> &lt;meta name="description" content=""> &lt;meta name="author" content=""> &lt;link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css"> &lt;link rel="stylesheet" type="text/css" href="custom/global.css"> &lt;link rel="stylesheet" type="text/css" href="stylesheets/theme.css"> &lt;link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css"> &lt;link rel="stylesheet" type="text/css" href="stylesheets/jquery-ui.css"> &lt;script src="lib/jquery-1.7.2.min.js" type="text/javascript">&lt;/script> &lt;script src="lib/jquery-ui-1.10.4.js" type="text/javascript">&lt;/script> &lt;!-- Demo page code --> &lt;style type="text/css"> #line-chart { height: 300px; width: 800px; margin: 0px auto; margin-top: 1em; } .brand { font-family: georgia, serif; } .brand .first { color: #FF5C0D; font-style: italic; } .brand .second { color: #fff; font-weight: bold; } &lt;/style> &lt;!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> &lt;!--[if lt IE 9]> &lt;script src="lib/html5.js">&lt;/script> &lt;![endif]--> &lt;!-- Le fav and touch icons --> &lt;link rel="shortcut icon" href="../assets/ico/favicon.ico"> &lt;link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> &lt;link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> &lt;link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> &lt;link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> &lt;/head> &lt;% ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()); RmsService rmsService = (RmsService) appContext.getBean("rmsService"); String lotId = FormatUtils.parseString(request.getParameter("lotId")); String rackId = FormatUtils.parseString(request.getParameter("rackId")); String status = FormatUtils.parseString(request.getParameter("status")); String fab = FormatUtils.parseString(request.getParameter("fab")); int pageSize = LineSideConstants.PAGE_SIZE_10; Integer pageIndex = FormatUtils.parseInteger(request.getParameter("pageIndex")); if (pageIndex == null) { pageIndex = 0; } RmsBinLotDetail rmsBinLotDetail = new RmsBinLotDetail(); rmsBinLotDetail.setLotId(lotId.trim()); rmsBinLotDetail.setCabinetId(rackId.trim()); rmsBinLotDetail.setStatus(status.trim()); rmsBinLotDetail.setFabsite(fab.trim()); PagerResult&lt;RmsBinLotDetail> pagerResult = rmsService.queryRmsBinLotDetailByPage(rmsBinLotDetail, pageIndex); List&lt;RmsBinLotDetail> rmsBinLotDetails = pagerResult.getResultList(); %> &lt;body class=""> &lt;%@ include file="navBar.jsp" %> &lt;%@ include file="sideBar.jsp" %> &lt;div class="content"> &lt;div class="header"> &lt;h1 class="page-title">Search&Report&lt;/h1> &lt;/div> &lt;div class="container-fluid"> &lt;div class="raw-fluid"> &lt;div class="block span6" style="width: 99%;"> &lt;a href="#tablewidget" class="block-heading" data-toggle="collapse">Search Criteria &lt;/a> &lt;div id="tablewidget" class="block-body collapse in"> &lt;form id="frmQuery" action="&lt;%=Page.TD_RMS_LOT_SEARCH %>" method="post"> &lt;input type="hidden" name="menu" value="&lt;%=menu%>"> &lt;input type="hidden" name="function" value="&lt;%=function%>"> &lt;input type="hidden" name="pageIndex"/> &lt;table class="table"> &lt;tr> &lt;td>Lot ID:&lt;/td> &lt;td>&lt;input type="text" id="lotId" name="lotId" value="&lt;%=lotId %>">&lt;/td> &lt;/tr> &lt;tr> &lt;td>Cabinet ID:&lt;/td> &lt;td>&lt;input type="text" id="rackId" name="rackId" value="&lt;%=rackId %>">&lt;/td> &lt;/tr> &lt;tr> &lt;td>Status:&lt;/td> &lt;td colspan="3" style="text-align: left;">&lt;select name="status"> &lt;option value="KITTING" selected="selected">KITTING&lt;/option> &lt;/select&gt;&lt;/td> &lt;/tr> &lt;tr> &lt;td>FabSite:&lt;/td> &lt;td colspan="3" style="text-align: left;">&lt;select name="fab"> &lt;option value="J2A DOI" selected="selected">DOI&lt;/option> &lt;/select&gt;&lt;/td> &lt;/tr> &lt;tr> &lt;td colspan="4" style="text-align: center;">&lt;input type="submit" class="btn btn-primary btn-small" value="Search" id="btnSearch"/>&lt;/td> &lt;/tr> &lt;/table> &lt;/form> &lt;/div> &lt;/div> &lt;/div> &lt;/div> &lt;div class="container-fluid"> &lt;div class="raw-fluid"> &lt;div class="block span6" style="width: 99%;"> &lt;a href="#tablewidget1" class="block-heading" data-toggle="collapse">Search Result List&lt;/a> &lt;div id="tablewidget1" class="block-body collapse in"> &lt;table class="table"> &lt;thead> &lt;tr> &lt;th>&lt;/th> &lt;th>Cabinet ID&lt;/th> &lt;th>Lot ID&lt;/th> &lt;th>Physical Lot ID&lt;/th> &lt;th>Customer Code&lt;/th> &lt;th>Customer Lot ID&lt;/th> &lt;th>QTY&lt;/th> &lt;th>Product ID&lt;/th> &lt;th>Status&lt;/th> &lt;th>Action&lt;/th> &lt;th>Create Date&lt;/th> &lt;th>Operator&lt;/th> &lt;th>FabSite&lt;/th> &lt;th>BoundFlag&lt;/th> &lt;/tr> &lt;/thead> &lt;tbody> &lt;% for (int i = 0; i &lt; rmsBinLotDetails.size(); i++) { RmsBinLotDetail item = rmsBinLotDetails.get(i); %> &lt;tr> &lt;td>&lt;%=pageIndex * pageSize + (i + 1) %> &lt;/td> &lt;td>&lt;%=item.getCabinetId() %> &lt;/td> &lt;td>&lt;%=item.getLotId() %> &lt;/td> &lt;td>&lt;/td> &lt;td>&lt;/td> &lt;td>&lt;/td> &lt;td>&lt;/td> &lt;td>&lt;/td> &lt;td>&lt;%=item.getStatus() %> &lt;/td> &lt;td>&lt;/td> &lt;td>&lt;%=item.getcDate() %> &lt;/td> &lt;td>&lt;%=item.getcUser() %> &lt;/td> &lt;td>&lt;%=item.getFabsite() %> &lt;/td> &lt;td>&lt;/td> &lt;/tr> &lt;% } %> &lt;/tbody> &lt;/table> &lt;/div> &lt;/div> &lt;div class="pagination"> &lt;ul> &lt;% int pageCount = pagerResult.getPageCount(); int totalShowPage = 10; int startPageIndex = pageIndex - totalShowPage / 2; int endPageIndex = 0; if (startPageIndex &lt; 0) { startPageIndex = 0; } endPageIndex = startPageIndex + 20; if (endPageIndex > pagerResult.getPageCount() - 1) { endPageIndex = pagerResult.getPageCount() - 1; } if (pageIndex > 0) { %> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=0 %>');">First&lt;/a>&lt;/li> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=pageIndex - 1 %>');">Prev&lt;/a>&lt;/li> &lt;% } if (startPageIndex > 0) { %> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=startPageIndex - 1 %>');">...&lt;/a>&lt;/li> &lt;% } for (int i = startPageIndex; i &lt;= endPageIndex; i++) { if (i == pageIndex) { %> &lt;li>&lt;a href="#" style="background-color: lightgray;">&lt;%=i + 1 %> &lt;/a>&lt;/li> &lt;% } else { %> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=i %>');">&lt;%=i + 1 %> &lt;/a>&lt;/li> &lt;% } } if (endPageIndex &lt; pageCount - 1) { %> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=endPageIndex + 1 %>');">...&lt;/a>&lt;/li> &lt;% } if (pageIndex &lt; pageCount - 1) { %> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=pageIndex + 1 %>');">Prev&lt;/a>&lt;/li> &lt;li>&lt;a href="javascript:void(0);" onclick="SearchPage('&lt;%=pageCount - 1 %>');">Last&lt;/a>&lt;/li> &lt;% } %> &lt;/ul> &lt;/div> &lt;/div> &lt;/div> &lt;/div> &lt;script src="lib/bootstrap/js/bootstrap.js">&lt;/script> &lt;script type="text/javascript"> $(document).ready(function () { $("#frmQuery select[name='status']").val('&lt;%=status %>'); $("#frmQuery select[name='fab']").val('&lt;%=fab %>'); }); function SearchPage(pageIndex) { $("#frmQuery input[name='pageIndex']").val(pageIndex); $("#frmQuery").submit(); } &lt;/script> &lt;/body> &lt;/html>
最新发布
12-04
&lt;?xml version='1.0' encoding='UTF-8'?> &lt;!DOCTYPE html> &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://java.sun.com/jsf/composite" xmlns:lkmcc="http://java.sun.com/jsf/composite/lkmComponent" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fm="http://java.sun.com/jsf/composite/studentlist/fragement"> &lt;cc:interface/> &lt;cc:implementation> &lt;style> .ui-panel .ui-panel-content { border: none !important; padding: 0.571em 0em !important; } .ui-datatable .ui-state-highlight { background-color: #bddef7 !important; color: #000 !important; font-weight: bold; } &lt;/style> &lt;p:outputPanel> &lt;div class="ui-fluid"> &lt;h:panelGrid columns="4" id="toolbar"> &lt;!-- &lt;p:outputPanel rendered="${mis_misBoardBean.role =='管理'}">--> &lt;!-- &lt;div class="ui-inputgroup">--> &lt;!-- &lt;span class="ui-inputgroup-addon" style="width:80px;">分配人员&lt;/span>--> &lt;!-- &lt;p:selectOneMenu id="emp" value="#{mis_misBoardBean.query.operator}" style="width:100px;">--> &lt;!-- &lt;f:selectItems value="#{mis_misBoardBean.misEmpList}" var="entry" itemLabel="#{entry}"--> &lt;!-- itemValue="#{entry}"/>--> &lt;!-- &lt;/p:selectOneMenu>--> &lt;!-- &lt;/div>--> &lt;!-- &lt;/p:outputPanel>--> &lt;p:outputPanel> &lt;div class="ui-fluid ui-inputgroup" style="display:inline-block;line-height:normal;"> &lt;span class="ui-inputgroup-addon" style="width:100px;">姓名&lt;/span> &lt;!-- &lt;p:inputText id="name" maxlength="30" class="ui-inputval" value="#{studentBean.query.name}"--> &lt;!-- style="width:200px">&lt;/p:inputText>--> &lt;/div> &lt;/p:outputPanel> &lt;p:outputPanel> &lt;div class="ui-fluid ui-inputgroup" style="display:inline-block;line-height:normal;"> &lt;span class="ui-inputgroup-addon" style="width:100px;">家庭地址&lt;/span> &lt;!-- &lt;p:inputText id="homeAddress" maxlength="30" class="ui-inputval" value="#{studentBean.query.homeAddress}"--> &lt;!-- style="width:200px">&lt;/p:inputText>--> &lt;/div> &lt;/p:outputPanel> &lt;p:outputPanel> &lt;div class="ui-inputgroup"> &lt;span class="ui-inputgroup-addon" style="width:80px;">有效状态&lt;/span> &lt;!-- &lt;p:selectOneMenu id="valid" value="#{studentBean.query.validStatus}"--> &lt;!-- style="width:100px">--> &lt;!-- &lt;f:selectItem itemLabel="有效" itemValue="Y"/>--> &lt;!-- &lt;f:selectItem itemLabel="无效" itemValue="N"/>--> &lt;!-- &lt;/p:selectOneMenu>--> &lt;/div> &lt;/p:outputPanel> &lt;!-- &lt;div class="ui-inputgroup">--> &lt;!-- &lt;p:selectBooleanCheckbox value="#{mis_misBoardBean.query.createByMe}" itemLabel="我创建"/>--> &lt;!-- &lt;/div>--> &lt;!-- &lt;div class="ui-inputgroup">--> &lt;!-- &lt;p:selectBooleanCheckbox value="#{mis_misBoardBean.query.isMe}" itemLabel="我的任务"/>--> &lt;!-- &lt;/div>--> &lt;!-- &lt;p:commandButton value="查询" class="query" actionListener="#{studentBean.query}"--> &lt;!-- update="board_page" ajax="true" style="width:80px;">&lt;/p:commandButton>--> &lt;!-- &lt;p:commandButton value="创建" class="query" actionListener="#{studentBean.openCreateTaskDialog}"--> &lt;!-- update="@form:createTask @form:tabView:misBoard:studentDialog" ajax="true"--> &lt;!-- style="width:80px;">&lt;/p:commandButton>--> &lt;/h:panelGrid> &lt;p:spacer width="10px" height="15px"/> &lt;!-- &lt;p:dataTable id="board_page" widgetVar="board_page" var="item" value="#{studentBean.boardList}" paginator="true"--> &lt;!-- paginatorPosition="bottom" rows="50" reflow="true" rowIndexVar="rowvar"--> &lt;!-- currentPageReportTemplate="{startRecord}-{endRecord} of {totalRecords} records"--> &lt;!-- paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"--> &lt;!-- rowsPerPageTemplate="50,100,150"--> &lt;!-- selectionMode="single"--> &lt;!-- selection="#{studentBean.selectBoardDm}"--> &lt;!-- emptyMessage="没有数据" resizableColumns="true" lazy="true">--> &lt;!-- &lt;p:column width="160" headerText="操作" style="text-align:right;">--> &lt;!--&lt;!– rendered="#{studentBean.butAuthority('修改',item,'待完成|待回复用户')}"–>--> &lt;!-- &lt;p:commandLink update="@form:tabView:misBoard:createDialog"--> &lt;!-- action="#{studentBean.studentDialog(item)}">--> &lt;!-- &lt;h:outputText value="修改"/>--> &lt;!-- &lt;p:spacer width="10px"/>--> &lt;!-- &lt;/p:commandLink>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column width="150" style="text-align:left;" headerText="姓名">--> &lt;!-- &lt;p:commandLink update="@form:createTask"--> &lt;!-- action="#{studentBean.preview(item)}">--> &lt;!-- &lt;h:outputText value="#{item.name}" id="contentName"/>--> &lt;!-- &lt;/p:commandLink>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column width="60" style="text-align:center;" headerText="年龄">--> &lt;!-- &lt;h:outputText value="#{item.age}"/>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column style="text-align:left;" headerText="家庭地址">--> &lt;!-- &lt;h:outputText value="#{item.homeAddress}" id="contentHomeAddress"/>--> &lt;!-- &lt;p:tooltip for="contentHomeAddress" value="#{item.homeAddress}" position="top" escape="false"--> &lt;!-- trackMouse="true">&lt;/p:tooltip>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column width="60" style="text-align:center;" headerText="有效状态">--> &lt;!-- &lt;h:outputText value="#{item.validStatus}"/>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column width="80" sortBy="#{item.enrollmentDate}" style="text-align:center;" headerText="入学日期">--> &lt;!-- &lt;h:outputText value="#{studentBean.format(item.enrollmentDate)}"/>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column width="80" sortBy="#{item.createTime}" style="text-align:center;" headerText="创建时间">--> &lt;!-- &lt;h:outputText value="#{studentBean.format(item.createTime)}"/>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;p:column width="80" sortBy="#{item.updateTime}" style="text-align:center;" headerText="更新时间">--> &lt;!-- &lt;h:outputText value="#{studentBean.format(item.updateTime)}"/>--> &lt;!-- &lt;/p:column>--> &lt;!-- &lt;/p:dataTable>--> &lt;/div> &lt;!-- &lt;p:dialog header="学生详情" id="studentDialog" widgetVar="studentDialog" modal="true">--> &lt;!-- &lt;p:outputPanel>--> &lt;!-- &lt;h:panelGrid columns="1">--> &lt;!-- &lt;p:inputTextarea value="#{studentBean.singleDm.homeAddress}" id="homeAddressContent" rows="10" cols="60" />--> &lt;!-- &lt;p:commandButton value="取消" style="width:80px;float:right;" oncomplete="PF('studentDialog').hide()"/>--> &lt;!-- &lt;p:commandButton value="保存" update="board_page" actionListener="#{studentBean.save}" />--> &lt;!-- &lt;/h:panelGrid>--> &lt;!-- &lt;/p:outputPanel>--> &lt;!-- &lt;/p:dialog>--> &lt;/p:outputPanel> &lt;/cc:implementation> &lt;/html> 为什么页面只有一个姓名的标签后面都没有内容
07-15
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值