Passing more than one parameter on button click.


We need a solution for one of the scenario where we have to pass more than one parameter on button click.

on clicking of
instead of passing only


now we need to pass


Normally we use
to fetch emp_id if it is just one parameter but in our case we are looking for a way to pass more than one parameter.


event.getButton().getCaption() to fetch emp_id
[/quote] 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();

… remembering that the value of the table is an item identifier and needs to be mapped to the Employee if not using a BeanItemContainer where the ID is the bean itself.