-
1. Re: looking for _quick_ sorting scrollabledatatable OR fixed
ilya_shaikovsky May 16, 2008 10:12 AM (in response to james.holder3)1) Our demosite has about 120 items in the table. If the sorting crashed your browser?
2) Sorting doesn't performed at client side. All sorting operations in this component performed at server.
3) resizing could not be turned off right now. Feel free to fill the request. -
2. Re: looking for _quick_ sorting scrollabledatatable OR fixed
james.holder3 May 16, 2008 1:49 PM (in response to james.holder3)After reading your post, I took a look at the example again, and it was sorting faster than my example with a 1/3 less rows.. So I decided to do a test.
WinXP
weblogic10
jsf1.2
richfaces 3.2.1CR4
Facelets
IE6
Bean/model codepublic class TestObject{ private String firstName; private String lastName; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } } private List<TestObject> names; public List<TestObject> getNames() { if(this.names==null){ this.names = new ArrayList(); for(int i=0;i<500;i++){ TestObject to = new TestObject(); to.setFirstName("First:"+i); to.setLastName("Last:"+i); this.names.add(to); } } return names; }
in the page itself:<h:form id="viewReportForm"> <rich:scrollableDataTable var="item" value="#{bean.names}" id="reportItemsTable" sortMode="single" > <rich:column id="firstName"> <f:facet name="header"> <h:outputText value="Name" > </f:facet> <h:outputText value="#{item.firstName}"/> </rich:column> </rich:scrollableDataTable> </h:form>
This setup, with 500 elements, and a single colum, took 1 minute and 5.5 seconds to complete a sort. (sorting + rendering)
Am I doing something wrong? leaving out an a4j:region or something?
Thanks for your help. -
3. Re: looking for _quick_ sorting scrollabledatatable OR fixed
james.holder3 May 16, 2008 3:12 PM (in response to james.holder3)Ok, after running some more tests, the slowness rests completely on IE's shoulders for rerendering the table. The sort is still super speedy, the slowdown comes when it tries to render. In my example, i was asking for it to load all the rows (rather than make ajax requests to get the table data on scroll). Lowering this to rows="50" is about as slow as I'm willing to let it go, and that works ok, sorting in just a few seconds.
Honestly what I'm looking for is rich:dataTable functionality, with a fixed header row. I've tried some CSS tricks, to make the dataTable render with fixed headers, but they tend to be extremely fragile.
I'm guessing that scrollabldatatable build the table body rows one at a time, explaining the extreme slowness when it tries to build more than 100 rows at once. It would be awesome if there was someway to tell it to just rerender the entire table body as as solid chunk of HTML, rather than relying on the DOM to add and remove those rows.
Does anyone have any suggestions for how to get strictly visual scrolling on a rich:dataTable?