How to display button as a link in vaadin?

Ads
 

How to display button as a link in vaadin?

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

View Answers

September 25, 2015 at 12:09 AM

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









Related Tutorials/Questions & Answers:
How to display button as a link in vaadin?
How to parse an HTML link and display whole content, in iPhone?
Advertisements
how to display the values of one list in other upon clicking a button in struts2
how to make previous and next Button Display Data in php
How to Display next Record from Database "On the Click of Next Button" USING ARRAYLIST
to display like and dislike votes for a link
how to display?
how to display?
how to display?
ModuleNotFoundError: No module named 'adafruit-circuitpython-display-button'
On Click on Submit Button Display Data on Orderlist
How to Display next Record from Database "On the Click of Next Button" USING ARRAYLIST
How to Display next Record from Database "On the Click of Next Button" USING ARRAYLIST
How to Display Next question from database after clicking Next Button using "Arraylist concept"
how to display data in excel sheet?
how to display records from database
how to display?
how to use button in array
How to get Button Id ?
How to Create Button With TableView in iphone
How to display windows virtual keyboard
how to display image with listview
how to create password reset link
How to display string or character
How to display date in JSP?
display contents on the same page by selecting a radio button
HOW TO DISPLAY TABLEEEE
How to Give button tool tip image
How to display the current time
How to add nofollow in website link?
How to display date in JSP?

Ads