How to display button as a link in vaadin?

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









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 default radio button in struts2.0 for first time login - Struts
how to display the values of one list in other upon clicking a button in struts2
to display like and dislike votes for a link
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
ModuleNotFoundError: No module named 'adafruit-circuitpython-display-button'
Display alert box on clicking link
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?
how to display?
how to display?
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 create Link in SWT
how to display?
how to create password reset link
display contents on the same page by selecting a radio button
how to retrieve link - JSP-Servlet
link
How to add nofollow in website link?
How to pass value of a link to a textfield
How to display windows virtual keyboard
how to use button in array
how to display image with listview
How to Create Button With TableView in iphone
How to get Button Id ?
link
how to display the image in center - Ajax
How to display string or character
How to display date in JSP?
how to display pdf file on browser
LINK
HOW TO DISPLAY TABLEEEE
How to display the current time
link
How to Give button tool tip image
LINK
How to display date in JSP?
display uiactivityindicatorview on button click through notification ios 5
How to display a file for 24 hours?
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.
how to link differnt modules - Java Beginners
how to give link from jsp to jsp page
how to give link from jsp to jsp page
How to make a button of different behaviour?

Ads