1 Reply Latest reply on Oct 30, 2008 9:05 PM by Nick Belaevski

    Issues with Rich Faces List Shuttle

    srinivas nori Newbie

      Hi,

      I am using List Shuttle in one of my screens. but i am running into some strange issue. Every thing works fine on the screen until i click the 'SAVE' or 'CANCEL' button on the screen.

      When i click any of those i am getting

      2:45:30,126 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=serviceForm:j_id94[severity=(ERROR 2), summary=("Component serviceForm:j_id94 has invalid value expression com.compu.model.toll.client.Service@bfc5"), detail=("Component serviceForm:j_id94 has invalid value expression com.compu.model.toll.client.Service@bfc5")].

      Here is My code;

      page:

      <rich:listShuttle sourceValue="#{serviceBackBean.availableList}"
      targetValue="#{serviceBackBean.selectedList}" var="items"
      sourceListWidth="160" targetListWidth="160"
      sourceCaptionLabel="Available Services"
      targetCaptionLabel="Selected Services">

      <rich:column>
      <f:facet name="header">
      <h:outputText value="Service Name" />
      </f:facet>
      <h:outputText value="#{items.serviceName}"></h:outputText>
      </rich:column>
      <rich:column>
      <f:facet name="header">
      <h:outputText value="CAMC ID" />
      </f:facet>
      <h:outputText value="#{items.camcServiceId}">
      <f:convertNumber integerOnly="true"/>
      </h:outputText>
      </rich:column>
      </rich:listShuttle>


      backing bean:

      private List availableList;
      private List selectedList;


      Service.java

      public class Service implements Serializable{

      private String serviceAreaId;
      private String serviceCode;
      private String serviceName;
      private String camcServiceId;

      public String getServiceAreaId() {
      return serviceAreaId;
      }
      public void setServiceAreaId(String serviceAreaId) {
      this.serviceAreaId = serviceAreaId;
      }
      public String getServiceCode() {
      return serviceCode;
      }
      public void setServiceCode(String serviceCode) {
      this.serviceCode = serviceCode;
      }
      public String getServiceName() {
      return serviceName;
      }
      public void setServiceName(String serviceName) {
      this.serviceName = serviceName;
      }
      public String getCamcServiceId() {
      return camcServiceId;
      }
      public void setCamcServiceId(String camcServiceId) {
      this.camcServiceId = camcServiceId;
      }

      public boolean equals(Object obj){

      if (this == obj)
      return true;

      if((obj == null) || (obj.getClass() != this.getClass()))
      return false;

      if (obj instanceof Service)
      {
      Service otherService = (Service) obj;

      if (this.serviceAreaId != null && otherService.serviceAreaId != null && this.serviceAreaId.equals(otherService.serviceAreaId))
      return true;
      }
      return false;
      }

      public int hashCode(){
      int hash = 7;
      hash = 31 * hash + (null == this.serviceAreaId ? 0 : this.serviceAreaId.hashCode());
      return hash;
      }

      }


      I googled for the last few days and tried all the possible combinations. Am i doing something wrong? Any help would be really appreciated.