简体   繁体   中英

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.

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行),并为用户提供滚动页面的选项。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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