tags:

views:

15

answers:

0

How can I set focus on next component in the form? For example:

        Button button1 = new Button("Button1");
        button1.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                button1.???
            }
        });

I dont know what next components are, and I dont want to know.
In a hard way I would need to check if next components exist. Next step is check if they are focusable or not. For example next component maight be a button (or other input), but it could be placed in <table><tbody><tr><td><button></td></tr></tbody></table> so i would need to do that in recursive way.
Isn't there a simpler way?