Hello Team,
I would like to know if there is way where user is taken to previous page on keying backspace. I have tried some thing like the folloiwng using actions, though it is working fine, it is preventing backspace ops even on Fields. Can anyone suggest a way in achieving this.
Following is the snippet that i have built
[code]
mainPanel.addActionHandler(new Handler() {
Action actionBackSpace = new ShortcutAction("BackSpace key", ShortcutAction.KeyCode.BACKSPACE, null);
Action actions = new Action { actionBackSpace };
@Override
public void handleAction(Action action, Object sender, Object target) {
if (target instanceof Field<?>) {
//TODO Do default Action i.e., default action on the fields like TextField, TextArea etc
} else {
//DO nothing
}
}
@Override
public Action getActions(Object target, Object sender) {
return actions;
}
});
[/code]I would really appreciate if I can get any help regarding the same.
Thanks,
Krishna