I have this code:
textValorPagamento.addShortcutListener(new ShortcutListener("Shortcut Name", ShortcutAction.KeyCode.ENTER, null) {
@Override
public void handleAction(Object sender, Object target) {
adicionarFormaPagamento();
}
});
textObsPagamento.addShortcutListener(new ShortcutListener("Shortcut Name", ShortcutAction.KeyCode.ENTER, null) {
@Override
public void handleAction(Object sender, Object target) {
adicionarFormaPagamento();
}
});
textValorTroco.addShortcutListener(new ShortcutListener("Shortcut Name", ShortcutAction.KeyCode.ENTER, null) {
@Override
public void handleAction(Object sender, Object target) {
finalizarPedido();
}
});
So I have 3 textfield in 2 when my user hit enter I execute the same method, but when I hit enter in my textValorTroco (TextField) he execute the adicionarFormaPagamento() method and not the finalizarPedido()
why?
tks