Hello people, this is my first post to your forums.
First of all, I have to tell that
I really like toolkit way of coding
, doing every bit in Java is wonderful! After playing for few days with your samples I decided to write down an apllication of my own. Now I am completely baffled with the following issue because my code is very simple and I can’t see what the heck I am doing wrong…
I got a simple table that contains four columns. All columns are String.class such as:
myTable.addContainerProperty("columnX", String.class, null);
I am adding one thousand lines (4000 cells) there which I want client to load all in one http call so Therefore I disable buffering by:
myTable.setPageLength(0);
And here I add 1000 items to my table in a loop
for (i=0; i < 999; i++) {
Item item = myTable.getItem(myTable.addItem());
item.getItemProperty("columnX").setValue("Ciao!!");
...
}
// I takes multiple minutes before we get past above for loop :-(
But if I make setPageLength(0) then adding those 1000 items takes
multiple minutes
on the server!! So, I grab my profiler and see that all the time is spent toolkit event classes such as com.itmill.toolkit.ui.AbstractField.fireValueChange. In fact it slows down exponentially based on how many items I already got in my table. This can’t work this way, how can I disable events when I am doing mass update to my table??