Focusable CellList

31 views
Skip to first unread message

Jim Douglas

unread,
Jun 20, 2011, 12:20:46 PM6/20/11
to Google Web Toolkit
Is it possible in GWT 2.3 to make a CellList Focusable...or would it
make sense to just wait for this issue, which is currently scheduled
for 2.4?

http://code.google.com/p/google-web-toolkit/issues/detail?id=5990

https://groups.google.com/group/google-web-toolkit/browse_thread/thread/8917eb6167effaf2

Thomas Broyer

unread,
Jun 20, 2011, 1:14:29 PM6/20/11
to google-we...@googlegroups.com

Jim Douglas

unread,
Jun 20, 2011, 1:42:26 PM6/20/11
to Google Web Toolkit
Sorry, I know better; I ask my customers for sample programs to ensure
nothing gets lost in translation.

There may be a simpler approach, but it seems to be working now with
the following additions to the wrapper class, which extends
AbstractPager:


m_cellList.addBlurHandler(new BlurHandler()
{
@Override
public void onBlur(BlurEvent p_event)
{
delegateEvent(CustomPager.this, p_event);
}
});
m_cellList.addFocusHandler(new FocusHandler()
{
@Override
public void onFocus(FocusEvent p_event)
{
delegateEvent(CustomPager.this, p_event);
}
});

...

private class FocusableCellList<T> extends CellList<T>
implements HasFocusHandlers, HasBlurHandlers
{
public FocusableCellList(Cell<T> p_cell)
{
super(p_cell);
}

@Override
public HandlerRegistration addFocusHandler(FocusHandler
p_handler)
{
return addDomHandler(p_handler, FocusEvent.getType());
}

@Override
public HandlerRegistration addBlurHandler(BlurHandler
p_handler)
{
return addDomHandler(p_handler, BlurEvent.getType());
}
}

On Jun 20, 10:14 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> Er, CellList *is* Focusable in
> 2.3:http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...
Reply all
Reply to author
Forward
0 new messages