In the Button class, there is a method .click()that you can .click()from the code that did not physically click on it.
Button b = new Button("b");
b.click();
How can I do this with Anchor? I call rpc and I want to open it in a new tabonSuccess();
Anchor a = new ("a", "url", "_blank");
a.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
RPC(onSuccess()){
String href = rpc.getUrl();
a.setHref(href);
a.click();
}
}
});
user467871
source
share