【问题标题】:Suggestionbox performance issue意见箱性能问题
【发布时间】:2010-08-25 08:31:43
【问题描述】:

我在使用建议框时遇到了一些性能问题。

我有一个 200 行的页面,每行有 2 个文本字段的建议框,页面加载时间超过 20 秒,

   <rich:dataTable
     id="detail_table"
     width="auto"
     value="#{testBean.testList}" 
     var="record" 
     headerClass="GrayBackgroundHeader"
     rowKeyVar="row"
     ajaxRendered="true"
     rowClasses="TableRowOdd,TableRowEven">
     <f:facet name="header">
         <rich:columnGroup>
             <h:column>
                 <h:outputText value="ColumnA" />
             </h:column>
             <h:column>
                 <h:outputText value="ColumnB" />
             </h:column>
         </rich:columnGroup>
    </f:facet>
    <rich:columnGroup>
         <h:column>
             <h:inputText value="#{record}" id="text1" />
             <rich:suggestionbox id="suggestionBoxId1" for="text1" selfRendered="true"/>
         </h:column>
         <h:column>
             <h:inputText value="#{record}" id="text2" />
             <rich:suggestionbox id="suggestionBoxId2" for="text2" selfRendered="true"/>
         </h:column>
    </rich:columnGroup>
 </rich:dataTable>

以上是我的测试代码。我是否错误地使用了建议框,或者请帮助提出建议以提高性能。

非常感谢~

【问题讨论】:

    标签: java jsf richfaces


    【解决方案1】:

    是否使用分页选项?如果是这样,您可能想检查以下示例 http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=dataModel&cid=295707 使用 datascroller 并更好地提高性能,您可以实现自己的 SerializableDataModel 在其中您将能够仅检索页面中所需的行数

    【讨论】:

    • 抱歉,这个页面不能使用分页功能
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-15
    • 1970-01-01
    • 2018-03-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多