3 Replies Latest reply on Feb 19, 2010 5:01 AM by Davide Malpassini

    invalid value expression listshuttle [ RichFaces 3.3.3CR1]

    Davide Malpassini Newbie

      I have the previous error (invalid value expression  ) in a listshuttle only when i load the targetValue with a non empty list an tyrying to save the changes tha the user have done to the list .

      <rich:listShuttle id="pkl" sourceValue="#{assegnaCoordinatori.listaProvinceDaAssegnare}"
                  targetValue="#{assegnaCoordinatori.listaProvinceAssegnate}" var="items" listsHeight="150"
                  sourceListWidth="130" targetListWidth="130" sourceCaptionLabel="Province Da Assegnare"
                  targetCaptionLabel="Province Assegnate al rilevatore selezionato"
                  converter="ENTCONV_UT"  fastOrderControlsVisible="false"  orderControlsVisible="false" sourceRequired="false" targetRequired="false" 
                      <h:outputText value="#{items.nomeProv}"></h:outputText>
                  <a4j:support event="onlistchanged" action="#{assegnaCoordinatori.modified}" immediate="true" />  


      The simptom is thatwhen i load the listShuttel with empty list is all ok


      while if the list is not empty i get the error:


      sourceId=j_id46:pkl[severity=(ERROR 2), summary=("Component j_id46:pkl has invalid value expression utenti.hibernate.Province@bab0"), detail=("Component j_id46:pkl has invalid value expression utenti.hibernate.Province@bab0")]


      The behind code in the managed bean is :

      List<Province> listaProvinceDaAssegnare;
          List<Province> listaProvinceAssegnate;


      and a init in the costructor





      I had already checked my converter that don't thow any Exception

      so which can be the problem?

        • 1. Re: invalid value expression listshuttle [ RichFaces 3.3.3CR1]
          Davide Malpassini Newbie

          With more time i noticed that this happens where the listshuttle is reRerendered from another component:

          another example is :

          <h:form >
           <h:outputText value="Coordinatori "/><br />
                   <h:selectOneListbox id="coordinatori" value="#{assegnaCoordinatori.selectedCoordinatore}"    converter="ENTCONV_UT"  validator="ENTVAL" immediate="true" styleClass="select_style">
                              <s:selectItems value="#{assegnaCoordinatori.listaCoordinatori}" var="age" label="#{age.codFisc}"   />
                   <a4j:support event="onchange"     action="#{test.onSelectCoordinatore}" reRender="tes"    >
           <rich:listShuttle id="tes" targetValue="#{test.listaOut}" sourceValue="#{test.listaIn}" var="items" fastOrderControlsVisible="false"  orderControlsVisible="false" sourceRequired="false" targetRequired="false">
                          <h:outputText value="#{items}"></h:outputText>
                      <a4j:support event="onlistchanged" action="#{test.save}" immediate="true" />  


          and the test bean is :


          public List<String> listaIn;
              public List<String> listaOut;
              public test() {
                  listaIn= new ArrayList<String>();
                  listaOut=new ArrayList<String>();
              public List<String> getListaIn() {
                  return listaIn;
              public void setListaIn(List<String> listaIn) {
                  this.listaIn = listaIn;
              public List<String> getListaOut() {
                  return listaOut;
              public void setListaOut(List<String> listaOut) {
                  this.listaOut = listaOut;
              public void save(){
              public void onSelectCoordinatore(){


          and the error :


          sourceId=j_id62:tes[severity=(ERROR 2), summary=("Component j_id62:tes has invalid value expression K"), detail=("Component j_id62:tes has invalid value expression K")]
          • 2. Re: invalid value expression listshuttle [ RichFaces 3.3.3CR1]
            Ilya Shaikovsky Master

            For the second case - you have no converter at all.

            for the first case - I gues converter just works in wrong way or equals() and hasCode() methods implemented wrong. This thread was risen many times at this forum and it's always had a solution by just debugging converter methods.


            Provide simple war sample for investigation if will not be able to solve on your own.

            • 3. Re: invalid value expression listshuttle [ RichFaces 3.3.3CR1]
              Davide Malpassini Newbie

              the solution is to use a <a4j:keepAlive> with  the bean name .


              Thanks a lot.