rich:listShuttle problem
shivaji.byrapaneni Jul 15, 2009 3:33 AMHi There,
I had my jsp included with rich:listShuttle when i tried to do any action after the listShuttle had been populated im getting thsi error
Component nominationSystemHome:listShuttle has invalid value expression com.vo.ApproveVO@fea10aee"
im using ths in my jsp
<rich:listShuttle sourceValue="#{approveCoursesBean.nominatedList}"
targetValue="#{approveCoursesBean.approvedList}" var="items"
sourceCaptionLabel="Nominated people"
targetCaptionLabel="People to approve" id="listShuttle"
converter="approveCoursesConverter">
<rich:column width="18">
<h:graphicImage value="#{items.iconURI}" width="25px" height="25px"></h:graphicImage>
</rich:column>
<rich:column>
<h:outputText value="#{items.label}"></h:outputText>
</rich:column>
</rich:listShuttle>
and my mbean had this
private ArrayList<ApproveVO> approvedList = new ArrayList<ApproveVO>(); private ArrayList<ApproveVO> nominatedList = new ArrayList<ApproveVO>();
with setters and getters
and my VO is this
package com.vo;
import java.io.Serializable;
public class ApproveVO implements Serializable {
private String iconURI;
private String label;
public ApproveVO(String iconURI, String label) {
this.iconURI = iconURI;
this.label = label;
}
public String getIconURI() {
return iconURI;
}
public void setIconURI(String iconURI) {
this.iconURI = iconURI;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if ((obj == null) || (obj.getClass() != this.getClass()))
return false;
ApproveVO approveVO = (ApproveVO) obj;
if (approveVO.iconURI.equals(this.iconURI)
&& approveVO.label.equals(this.label))
return true;
return false;
}
@Override
public int hashCode() {
int hash = 7;
hash = 31 * hash;
hash = 31 * hash + (null == this.label ? 0 : this.label.hashCode());
return hash;
}
}
i had implemneted my equals method perfectly along with hashcode method..
Please help me..
many thansk in advance..