I have a screen that has multiple search parameters and displays the results in a table that uses paging. The user wants to be able to hit page up or page down to change pages on the table without having to touch their mouse. How would I go about doing this in GWT?
Add a KeyUpHandler to your view. Detect if a key code equals arrow up or arrow down. If it does, change the page number and refresh the table.
UPDATE:
This is how you add a KeyUpHandler to a Composite widget:
myPanel.addDomHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
if (event.getNativeKeyCode() == KeyCodes.KEY_DOWN) {
// Reduce page number
}
}
}, KeyUpEvent.getType());