【发布时间】:2014-02-18 06:32:52
【问题描述】:
我有一个数据表,在标题中我有:
-The name of the table
-A button
我希望名称显示在中间,按钮显示在右侧。
<p:dataTable widgetVar="liveResizeTableWdg"
var="c"
value="#{errorContractBean.getDataList(loginBean.usernameLoggedOn)}"
paginator="true"
rows="33"
paginatorPosition="bottom"
currentPageReportTemplate="Showing {startRecord}-{endRecord} out of {totalRecords},
Page: {currentPage}/{totalPages},
Total: #{errorContractBean.dataListSize}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowKey="#{c.uniqueRowID}"
selection="#{errorContractBean.selectedContract}"
selectionMode="single"
scrollable="true"
scrollWidth="auto"
scrollHeight="auto"
filteredValue="#{errorContractBean.filteredContracts}"
resizableColumns="true"
liveResize="true"
id="liveResizeTable"
sortMode="single"
styleClass="table"
headerClass="table-header"
rowStyleClass="rowDef"
lazy="true">
<f:facet name="header">
<span style="font-size: 1.5em; color: red;">Error Transactions</span>
<p:commandButton value="Refresh" actionListener="#{errorContractBean.refreshPage}"
update=":form" style="position:relative;" oncomplete="liveResizeTableWdg.filter(); liveResizeTableWdg.clearFilters();">
</p:commandButton>
</f:facet>
现在名称和按钮都出现在中间:
表:
-------------------------------------------------- ---------------------- ......................... 表格名称 - 按钮 -------------------------------------------------- ----------------------我想要这个:
-------------------------------------------------- ---------------------- ...................... 表的名称...................... .... 按钮 -------------------------------------------------- ----------------------我希望位置是相对的,因为当我缩小窗口时,按钮 必须按照页面。 如果我尝试在 css 中指定左或右,则 2 个元素不遵循 页面大小。
【问题讨论】:
-
已经尝试在按钮上使用
style="float: right;"? -
不,我试试谢谢你的回复
标签: html css jsf-2 primefaces