简体   繁体   English

JSF 1.2 dataTable问题

[英]JSF 1.2 dataTable Issue

I have a requirement like " On selection of catalog, I would like to fetch the data from database. One of catalog is having very huge data like (25000 and above records. To get these records from db and display in fronted I am using JSF dataTable tag". As mentioned below. But this is taking more and more time. Some times page is also getting timed out. can any body help me. 我有一个要求,例如“在选择目录时,我想从数据库中获取数据。目录中的一个具有非常大的数据,例如(25000及以上的记录。要从db获取这些记录并在前面显示,我正在使用JSF dataTable标记”。如下所述。但这花费了越来越多的时间。有时页面也会超时。任何机构都可以帮助我。

enter code here

                                            <h:column>
                                                <f:facet name="header">
                                                <h:outputText  value="Sr.No." />
                                                </f:facet>``
                                                <h:outputText value=" #{PromoCodeDefinitionBean.table.rowIndex+1}" styleClass="blackboldSmall" />
                                            </h:column>

                                            <h:column  rendered="#{PromoCodeDefinitionBean.except}">
                                                <f:facet name="header">
                                                    <h:selectOneMenu id="useCountAll" onchange="changeValue();">
                                                        <h:outputText value="Use Count  " />
                                                        <f:selectItem itemLabel="Count" itemValue=""/>
                                                        <f:selectItem itemLabel="1" itemValue="1"/>
                                                        <f:selectItem itemLabel="2" itemValue="2"/>
                                                        <f:selectItem itemLabel="3" itemValue="3"/>
                                                        <f:selectItem itemLabel="4" itemValue="4"/>
                                                        <f:selectItem itemLabel="5" itemValue="5"/>
                                                    </h:selectOneMenu>
                                                </f:facet>
                                                <h:inputText id="useCount"  binding="#{PromoCodeDefinitionBean.userCount}" value="#{output.checkvalue}" size="2"  styleClass="mandFieldClass"></h:inputText>
                                            </h:column>

                                            <h:column>
                                                <f:facet name="header">
                                                <h:outputText  value="User Name" />
                                                </f:facet>
                                                <h:outputText value=" #{output.userName}"  styleClass="blackboldSmall" />
                                            </h:column>


                                            <h:column>
                                                <f:facet name="header">
                                                <h:outputText  value="Email" />
                                                </f:facet>
                                                <h:outputText value=" #{output.emailId}"  styleClass="blackboldSmall" />
                                                 <h:inputHidden id="emailId" binding="#{PromoCodeDefinitionBean.email}" value="#{output.emailId}"></h:inputHidden>
                                            </h:column> 

                                            <h:column  rendered="#{PromoCodeDefinitionBean.except}">
                                                <f:facet name="header">
                                                <h:selectBooleanCheckbox id="BulkMovementAll" onclick="checkUncheckAll();" ><h:outputText value="Select All  "  />
                                                <br></h:selectBooleanCheckbox>
                                                </f:facet>
                                                <h:selectBooleanCheckbox binding="#{PromoCodeDefinitionBean.checkedSelectedUser}" value="#{output.ischecked}" id="BulkMovement" onclick="test1(this.id)" />
                                                <h:outputText  id="checkboxvalue1" value="#{output.ischecked}"  style="display: none; text-align:center;" />
                                            </h:column>

                                    </h:dataTable>

Please help me to improve my displaying logic. 请帮助我改善显示逻辑。

Thanks in advance. 提前致谢。

您可以使用Paginator&一次仅获取少量记录(例如10行),并为用户提供滚动页面的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM