Hello,
I am working on a Vaadin based web application. I want the button to be displayed like link but it should work like a button.
I would like to attach the event just like a button.
How to achieve this?
Thanks
Hi,
You can use the following code:
final Button btnClickMe = new Button("Click Me"); btnClickMe.setStyleName(BaseTheme.BUTTON_LINK); btnClickMe.addClickListener(new ClickListener() { @Override public void buttonClick(final ClickEvent event) { //Your code here } });
The function:
btnClickMe.setStyleName(BaseTheme.BUTTON_LINK);
is used to make a button look like as link.
Thanks
Ads