2017-08-29 113 views
0

我正在使用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> 
+0

是对collapsiblePanel倒塌?如果表格不可见,表格无法正确计算标题大小等内容。 – Makhiel

+0

默认不折叠。它只是显示为正常的表格。这就是为什么这种行为如此奇怪。这就像初始化或更新js不触发 – Jolley71717

回答

0

答案最终在版本中。

我结束了使用4.5.10保持自己的网站功能,同时避免在4.5.17

介绍在RichFaces的4.5.17的最终版本的bug存在被阻止的JavaScript自动错误和动态呈现滚动条。 解决的办法是备份的版本了,以至于我没有遇到同样的错误,而在同一时间,避免在释放描述的许多其他已知的bug指出 https://developer.jboss.org/people/michpetrov/blog/2016/06/22/richfaces-4517final-release-announcement

相关问题