how to use AbstractHasData.setFocus?

17 views
Skip to first unread message

tong123123

unread,
May 31, 2012, 3:57:52 AM5/31/12
to google-we...@googlegroups.com
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?













Result.png

Thomas Broyer

unread,
May 31, 2012, 4:10:38 AM5/31/12
to google-we...@googlegroups.com
Have you tried deferring the call to setFocus? (using Scheduler#scheduleDeferred)
Reply all
Reply to author
Forward
0 new messages