DataTable LazyLoading cause IE`s Script run slow error

UI Components for JSF
Post Reply
kaku
Posts: 43
Joined: 28 Jan 2012, 15:09

26 Feb 2012, 15:37

Hi,Guys! :)
I used LazyLoading of DataTable to develop WebApplication on Primefaces 2.2.1
but when i click the pagiator to select "1000" in order to display 1000 records in a page,
The IE error dialog is showed.message is "A script on this page is causing Internet Explorer to run slowly....".
and it spent 100 seconds to display search results.
The search of The Application layer is spent 5 seconds.
That's why IE error message be showed.

The sample code is follow:

Code: Select all

<h:form id="form">

    <p:dataTable var="car" value="#{tableBean.lazyModel}" paginator="true" rows="10"
                 paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
                 rowsPerPageTemplate="10,100,1000," selectionMode="single" selection="#{tableBean.selectedCar}" id="carTable">

        <p:ajax event="rowSelect" listener="#{tableBean.onRowSelect}" update=":form:display" oncomplete="carDialog.show()" />

        <p:column headerText="Model" sortBy="#{car.model}" filterBy="#{car.model}">
            <h:outputText value="#{car.model}" />
        </p:column>

     <p:column headerText="button1" >
            <p:commandButton image="ui-icon-update" value="update" title="update"/>
        </p:column>
     <p:column headerText="button2" >
            <p:commandButton image="ui-icon-minus" value="leave" title="leave"/>
        </p:column>
    </p:dataTable>
  </h:form>
                    
Now I solve that by changing the CommandButton above to CommangLink .
The message "A script on this page is causing Internet Explorer to run slowly...." is never showed any more.
and it spent 7 seconds to show search results.

Question:
1.Why CommandButton can't.
2.Somebody else have better solution.

Please help me. ;)

kaku

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

26 Feb 2012, 21:55

1. Reply with your bean code, especially, to show the init(), getter, and setter methods of your lazyDataModel.
2. Migrate your app from PrimeFaces 2.x to 3.x (latest version), click URL below and follow instructions

Migration guide to 3.0
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

kaku
Posts: 43
Joined: 28 Jan 2012, 15:09

27 Feb 2012, 16:35

Thank you very much for reply quickly.
I am thinking about to Migrate 2.x to 3.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests