Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Passing more than one parameter on button click.

Pro Vaadiner
1 decade ago Feb 29, 2012 6:04am
Danny Roest
1 decade ago Feb 29, 2012 6:48am

event.getButton().getCaption() to fetch emp_id

seems like a very bad way.

You could do something like this:

public class MyButtonListener implements Clicklistener{

private final Employee employee;

public MyButtonListener( Employee employee){
this.employee = employee;


button.addListener(new MyClickListener(currentEmployee));

or if the employee is based on the current value in a table just to a Employee e = (Employee)table.getValue();

Last updated on Feb, 29th 2012
Henri Sara
1 decade ago Feb 29, 2012 8:03am