1 Reply Latest reply on Oct 30, 2012 11:37 AM by Bob Lapointe

    selectBooleanCheckbox inside a Richfaces:OrderingList : PropertyNotFoundException

    Bob Lapointe Newbie

      Hello everybody,

       

      I've got a problem with a selectBooleanCheckbox element inside a Richfaces orderingList.

       

      The elements of my orderingList are specific objects.

      Each object contains a String "nom" and a boolean "autre".

      I want to display the String in outputText and the boolean in a selectBooleanCheckbox. And all these elements in a orderingList.

       

      I added a commandButton to submit the list to my bean.

       

      Here is the code :

       

      xhtml :

       

      <html:form>
      ...
      <rich:orderingList id="tableValeurs"
          value="#{adminLDBean.valeurs}" var="valeur"
          listHeight="200" listWidth="200"
          selection="#{adminLDBean.valeursSelectionnees}">
          <core:converter converterId="ListDynValeursConverter" />
      
          <rich:column width="30" align="center" style="text-align: center;">
              <core:facet name="header"></core:facet>
              <html:commandLink actionListener="#{adminLDBean.supprimerValeur}"
                  reRender="tableValeurs">
                  <core:param name="valeurASupprimer1" value="#{valeur.nom}" /> 
                  <html:graphicImage url="resources/image/supprimer.png"
                      title="Supprimer" styleClass="imgSupprimer"/>
              </html:commandLink>
          </rich:column>
          <rich:column width="120" align="center" style="text-align: center;">
              <core:facet name="header"><html:outputText id="otValeur" value="#{admin.nomValeur}" /></core:facet>
              <html:outputText value="#{valeur.nom}" />
          </rich:column>
          <rich:column width="50" align="center" style="text-align: center;">
              <core:facet name="header"><html:outputText id="otAutre" value="#{admin.autre}" /></core:facet>
              <html:selectBooleanCheckbox id="sbcAutre" value="#{valeur.autre}" />
          </rich:column>
      </rich:orderingList>
      
      ...
      <html:commandButton action="#{adminLDBean.valider}" value="#{admin.valider}" />
      </html:form>
      

       

       

      When I click on the commandButton I get the following Exception :

      javax.faces.component.UpdateModelException: javax.el.PropertyNotFoundException: /adminLD.xhtml @109,84 value="#{valeur.autre}": Target Unreachable, identifier 'valeur' resolved to null

      javax.faces.component.UIInput.updateModel(UIInput.java:853)

      ...etc...

       

      I don't understand why.

      If I replace the orderingList with a datatable element it works fine.

       

      Thanks in advance.