I have a listShuttle component made of a list of ImageBean objects with two properties:
private String id;
private MagickImage image;
The listShuttle only displays the String id on the page, but I have a problem with my converter.
public Object getAsObject(FacesContext context, UIComponent component,
String value) {
int index = value.indexOf(':');
return new ImageBean(value.substring(0, index), value.substring(index + 1)) );
}
The converter won't compile because ImageBean doesn't have a constructor of String, String.
Do I need to write a constructor for the imageBean so that it accepts String, String or is there another way round this with the converter?
Any help appreciated.