Adding multiselect ListSelect to a form

Hi,

I need add a ListSelect-multiselect (with a list of atuthors )inside a form, well …when i select the items throws and exception :

Caused by: java.lang.NumberFormatException: For input string: "[3]
"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.(Integer.java:620)
… 25 more


public class Pojo implements Serializable{
	
	public String title = "";
	public Integer idpublisher;
	public Integer idauthor;
	private Date datepublication;


	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Integer getIdpublisher() {
		return idpublisher;
	}

	public void setIdpublisher(Integer idpublisher) {
		this.idpublisher = idpublisher;
	}

	public Date getDatepublication() {
		return datepublication;
	}

	public void setDatepublication(Date datepublication) {
		this.datepublication = datepublication;
	}

	public Integer getIdauthor() {
		return idauthor;
	}

	public void setIdauthor(Integer idauthor) {
		this.idauthor = idauthor;
	}

	
}

How should do to fix this?

Thanks!!

Your class has a single Integer for the author ID, yet you want to select multiple authors.

In multiselect mode, the ListSelect’s value is a collection of item IDs. If there’s just one item selected, the value is a collection of size 1.

Thanks!! Fixed as this!!

public class Pojo implements Serializable{
	
	public String title = "";
	public Integer idpublisher;
	public Collection <Object> idauthor;
	private Date datepublication;

.....