我正在使用richFaces 4.5.17,並試圖使用extendedDataTable。當我第一次加載頁面時,顯示的數據太大,應該會導致顯示滾動條的擴展數據表。但是,實際結果只是一個只顯示4行的窗口。此外,數據表中不顯示標題。RichFaces extendedDataTable滾動條直到屏幕調整大小後才顯示
如果您調整瀏覽器窗口的大小,即使大小爲1px,滾動條也會突然顯示,並且會彈出標題。
雖然對用戶有一個解決方法,但每次刷新頁面時用戶不得不調整其窗口大小是一個主要缺陷。
的頭正在顯示爲0的生成高度,但我能得到頭通過修改我的styles.css的頁面,包括顯示:
.rf-edt-hdr-c{
height:45px !important;
}
從代碼的片段我頁面是:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core" lang="en">
<h:head></h:head>
<h:body>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:a4j="http://richfaces.org/a4j" >
<t:panelGroup>
<rich:collapsiblePanel header="Reverts:" headerClass="textLeft" switchType="ajax" >
<rich:extendedDataTable id="listReverts" value="#{accountingBacking.reverts}" var="revert" columnClasses="textCenter, textCenter,textRight, textLeft,textCenter, textLeft"
sortMode="single" first="0" frozenColumns="1" style="width:830px;height:100px;">
<rich:column sortBy="#{revert.tranDate}">
<f:facet name="header">
<h:outputText value="Tran Date" />
</f:facet>
<a4j:commandLink render="accountDetailForm" action="#{accountingBacking.loadRevertTransaction}" onclick="#{rich:component('popAccountTranDetail')}.show()" onmouseover="Tip('#{msg_bundle.account_loadDetail_help}')">
<a4j:param name="tranid" value="#{revert.tranid}" assignTo="#{accountingBacking.tranId}" />
<h:outputText value="#{revert.tranDate}">
<f:convertDateTime type="date" pattern=" MM/dd/yyyy" />
</h:outputText>
</a4j:commandLink>
</rich:column>
<rich:column sortable="false">
<f:facet name="header">
<h:outputText value="Org" />
</f:facet>
<h:outputText value="#{revert.org}" />
</rich:column>
</rich:extendedDataTable>
</rich:collapsiblePanel>
</t:panelGroup>
</ui:composition>
</h:body>
</html>
是對collapsiblePanel倒塌?如果表格不可見,表格無法正確計算標題大小等內容。 – Makhiel
默認不折疊。它只是顯示爲正常的表格。這就是爲什麼這種行爲如此奇怪。這就像初始化或更新js不觸發 – Jolley71717