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 data in excel sheet?
how to display records from database
How to Display Next question from database after clicking Next Button using "Arraylist concept"
how to display?
how to display?
how to display?
How to create Link in SWT
display contents on the same page by selecting a radio button
link
how to display?
how to create password reset link
how to retrieve link - JSP-Servlet
How to display windows virtual keyboard
link
How to add nofollow in website link?
How to pass value of a link to a textfield
LINK
how to display image with listview
how to display the image in center - Ajax
link
How to Create Button With TableView in iphone
how to use button in array
LINK
how to display pdf file on browser
How to display string or character
How to display date in JSP?
display uiactivityindicatorview on button click through notification ios 5
HOW TO DISPLAY TABLEEEE
How to get Button Id ?
How to display the current time
How to display date in JSP?
How to Give button tool tip image
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.
How to display a file for 24 hours?
how to display each arraylist value on new page in jsp
how to display selected checkboxes dynamically using jsp
how to link differnt modules - Java Beginners
how can i display a pdf file in a jtextarea

Ads