JSF datatable 设置列宽

<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://java.sun.com/jsf/composite" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:head> <title>进度查询</title> </h:head> <style> /* 适配手机端 reflow 表格 */ @media screen and (max-width: 767px) { .ui-datatable-reflow .ui-datatable-tablewrapper { overflow-x: auto; } .ui-datatable-reflow .ui-datatable-data > tr > td { display: block; text-align: left; border: none; padding: 0.5em 0; } .ui-datatable-reflow .ui-datatable-data > tr > td::before { content: attr(data-label); font-weight: bold; display: inline-block; width: 40%; padding-right: 10px; } } </style> <h:body> <h:form id="form1"> <p:inputText style="width:100%;margin:0;padding:10px;" value="#{progressQueryBean.content}" placeholder="请扫描数据" id="content"> <f:ajax event="keyup" listener="#{progressQueryBean.handleInput}" /> </p:inputText> <p:outputPanel id="headerProgress" > <h:outputText id = "oldContent" reflow="true" style="font-size:15px;max-width:100%" value="#{progressQueryBean.oldContent}"/> <p:dataTable var="orderPlanProgress" styleClass="headerProgress1" id="planDlg00Progress" value="#{progressQueryBean.orderPlanList}" rows="20" reflow="true" paginatorPosition="bottom" resizableColumns="true" rowHover="true" rowIndexVar="rowvar" widgetVar="planDlg00Progress" paginator="true" lazy="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15,20,50"> <p:column headerText="下载时间" style="text-align:center;width:80px" width="5%"> <h:outputText value="#{orderPlanProgress.downloadTime}"> <f:convertDateTime pattern="MM/dd HH:mm" timeZone="GMT+8"/> </h:outputText> </p:column> <p:column headerText="机床号" style="text-align:left;width:100px" width="5%"> <h:outputText value="#{orderPlanProgress.machineNo}"/> </p:column> <p:column headerText="认领人" style="text-align:center;width:50px" width="5%"> <h:outputText value="#{orderPlanProgress.empNo}-#{orderPlanProgress.downEmpName}"/> </p:column> <p:column headerText="有效工序" style="text-align:left;width:70px" width="10%"> <h:outputText value="#{orderPlanProgress.workingStep}"/> </p:column> <p:column headerText="厂房" style="text-align:left;width:150px" width="5%"> <h:outputText value="#{orderPlanProgress.factoryName}"/> </p:column> <p:column headerText="备注" style="text-align:left;width:150px"> </p:column> </p:dataTable> </p:outputPanel> </h:form> </h:body> </html> 请修改自适应手机端
最新发布
11-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值