CellList refreshed only after mouse move

72 views
Skip to first unread message

mitel

unread,
May 29, 2011, 1:37:47 PM5/29/11
to Google Web Toolkit
Hi,
I'm doing some tests using realtime message push from different
providers (Beaconpush, PubNub) and I want to render the received
messages
as soon as they hit the client. I'm using a callback that updates a
ListDataProvider ( getList().add(pushedMessage) ).
The message is received, as I can see it in my logs , the model is
updated - I do a dataProvider.refresh().

The strange thing is that the received message is rendered in the
browser only after a mouse move inside the browser window.
If I keep moving the mouse around, the pushed messages come in real
time.

What would be the workaround to render the information without
touching the mouse? I tried cellList.redraw() inside the callback
after
each message is received but doesn't help.

Thank you

pH4Lk0n

unread,
Mar 23, 2017, 10:54:56 AM3/23/17
to GWT Users
This problem still exists in GWT 2.8.0.

I've got similar problem. I just want to select record that is clicked elsewhere but user needs to move mouse to see this effect.
It's unusable right now in this scenario because it seems application work sluggish.

Is there any workaround this problem??

Best regards

Thomas Broyer

unread,
Mar 23, 2017, 11:31:59 AM3/23/17
to GWT Users


On Thursday, March 23, 2017 at 3:54:56 PM UTC+1, pH4Lk0n wrote:
This problem still exists in GWT 2.8.0.

I've got similar problem. I just want to select record that is clicked elsewhere but user needs to move mouse to see this effect.
It's unusable right now in this scenario because it seems application work sluggish.

Is there any workaround this problem??

Cell-widget changes are scheduled using Scheduler#scheduleFinally.

I'd say you're probably calling GWT code from a JSNI and you didn't wrap your callback function into $entry(). $entry() ensures scheduleEntry and scheduleFinally work as expected, and also routes exceptions to the GWT.UncaughtExceptionHandler (if there's one).

Rob Newton

unread,
Apr 8, 2017, 7:34:24 AM4/8/17
to GWT Users
I have encountered this problem myself.  When the new data arrives, rather than updating the CellList/Grid immediately, defer the update until the current event loop has completed.  For example:

    private static void setRowDataDeferred(
           
final DataGrid<Consign> grid, final int start, final List<Consign> values)
   
{
       
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
           
@Override
           
public void execute() {
                grid
.setRowCount(values.size(), true);
                grid
.setRowData(start, values);
           
}
       
});
   
}




Reply all
Reply to author
Forward
0 new messages