Hello again.
I’m using new Vaadin 6.4 pre1 whith it focusable Table.
I have a Table, a Form and FieldFactory for them. In the Factory I create some fields with next listeners (f is really TextField):
((FieldEvents.BlurNotifier) f).addListener(new FieldEvents.BlurListener() {
@Override
public void blur(FieldEvents.BlurEvent event) {
System.out.println("Blur " + event);
}
});
((FieldEvents.FocusNotifier) f).addListener(new FieldEvents.FocusListener() {
@Override
public void focus(FieldEvents.FocusEvent event) {
System.out.println("Focus " + event);
}
});
f.addShortcutListener(new ShortcutListener("Down", ShortcutAction.KeyCode.ARROW_DOWN, null) {
public void handleAction(Object sender, Object target) {
System.out.println("Down pressed: "+target);
}
});
If Field is put to Form, everything is almost good. I can see this In console:
[i]
Blur com.vaadin.event.FieldEvents$BlurEvent[source=4]
Focus com.vaadin.event.FieldEvents$FocusEvent[source=4]
Blur com.vaadin.event.FieldEvents$BlurEvent[source=4]
Focus com.vaadin.event.FieldEvents$FocusEvent[source=4]
Down pressed: 4
[/i]
Too many Blur/Focus, but it’s not big problem.
But if Field is put to Table, then ShortCut Event doesn’t fire: when i press down arrow i get this:
[i]
Blur com.vaadin.event.FieldEvents$BlurEvent[source=15]
Focus com.vaadin.event.FieldEvents$FocusEvent[source=15]
Blur com.vaadin.event.FieldEvents$BlurEvent[source=15]
Focus com.vaadin.event.FieldEvents$FocusEvent[source=15]
[/i]
More interesting: if i remove Blur and Focus listeners, I get my Shortcut event working.
Is it a bug or I’m missing something?
Thanks in advance for help.