Thursday, May 31, 2012

Re: how to use AbstractHasData.setFocus?

Have you tried deferring the call to setFocus? (using Scheduler#scheduleDeferred)

On Thursday, May 31, 2012 9:57:52 AM UTC+2, tong123123 wrote:
the upperpart of the resut.png is a celltable table, the table use a singleselectionmodel.
table.setKeyboardSelectionPolicy(KeyboardSElectionPolicy.BOUND_TO_SELECTION);
table.setSelectoinModel(singleSelectionModel);
singleSelectionModel.setSelected(logs.get(0), true);
table.setFocus(true);

when the resut.png is shown, the first row is really selected, by then when I try to use keyboard upper arrow or down arrow key to select record, the CellTable has no response although I already setFocus to it!!
I found that I must use the mouse to select the record in CellTable first, then the keyboard upper arrow or down arrow key can be used to select recrod, why?













--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/O_OXe5H4X50J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment