On 2013/05/20 18:44, Kristian Lind wrote:
To try this I made a method
public PrintProviderExceptionMockEnt getException() {
That just returns the first and only exception in the list..

and change my Select to...

// Select exception
exception = new Select("exception", true);

But nothing is happening :(

Correct. The Select is populated with Options as follow:
options.add(new Option(printProviderExceptionMockEnt.getId() ....);

By setting the selected value to a PrintProviderExceptionMockEnt, Click will just call toString on it. The Select control isn't smart enough to know about the PrintProviderExceptionMockEnt,getId() method.

So basically you just need to set the value yourself. So after this line:
  form.copyFrom

do this:
form.exception.setValue(someIdOfAnException);

regards

Bob

Reply via email to