2 Replies Latest reply on Jul 30, 2013 10:00 AM by lionceau

    error listshutle  -  has invalid value expression

    lionceau

      hello

       

      Why i have this error on my listshutle ? [QUOTE]"Component modificationProfil:listes_droits has invalid value expression Gérer les collaborateurs"[/QUOTE]

       

      problistshutle.jpg

       

      this is the code of my rich:listShuttle :

       

       

       

       

       

       

       

                                                                                                          <rich:listShuttle id="listes_droits" sourceValue="#{gestionProfil.sourceList}"

                                                                                                                           targetValue="#{gestionProfil.listValues}" var="items"

                                                                                                                            sourceCaptionLabel="Droits disponibles" targetCaptionLabel="Droit(s) selectionné(s)" listWidth="165px"

                                                                                                                            listHeight="100px" orderable="true" orderControlsVisible="false" fastOrderControlsVisible="false"

                                                                                                                                    converter=""

                                                                                                                            copyAllControlLabel="Selectionner tout"

                                                                                                                            removeAllControlLabel="Deselectionner tout"  

                                                                                                                                        copyControlLabel="Selectioner"  

                                                                                                                                                removeControlLabel="Deselectionner">

                                                                                                                          <h:column>

                                                                                                                            <h:outputText value="#{items}"/>

                                                                                                                          </h:column>

                                                                                                          </rich:listShuttle >

       

       

       

       

       

      Thank you for your help.

       

       

      Florian Brunet

        • 1. Re: error listshutle  -  has invalid value expression
          lionceau

          Hello;

           

          I have juste make a converter "listShuttleconverter" and  i have the same error.. Someone can help me please?

           

          <rich:listShuttle id="listes_droits" sourceValue="#{gestionProfil.sourceList}"
             targetValue="#{gestionProfil.listValues}" var="items" 
             sourceCaptionLabel="Droits disponibles" targetCaptionLabel="Droit(s) selectionné(s)" listWidth="165px" 
             listHeight="100px" orderable="true" orderControlsVisible="false" fastOrderControlsVisible="false"
             copyAllControlLabel="Selectionner tout"
             removeAllControlLabel="Deselectionner tout"   
             copyControlLabel="Selectioner"
             removeControlLabel="Deselectionner" 
             converter="listShuttleconverter">                                                                                                                  
             <h:column>
             <h:outputText value="#{items}"/>
             </h:column>
             </rich:listShuttle >
          

           

           

          and this is the code of the converter :

           

           

          package applications.gestioncs.administration;
          
          
          
          import java.util.ArrayList;
          
          
          import javax.faces.component.UIComponent;
          import javax.faces.context.FacesContext;
          
          
          
          import applications.gestioncs.msg.MsgDroit;
          
          
          
          
          
          
          
          
          /**
           * Convertisseur pour le listshuttle.
           * @author fbrunet 
           */
          public class ListShuttleConverter  implements javax.faces.convert.Converter {
          
          
          
              @Override
                    public Object getAsObject(FacesContext context, UIComponent component, String value) {
          
          //              Object droit = (String) value;
          
                              System.out.println("converter getAsObject : " + value);
          
          
                    //          System.out.println("objetRetour : " + objetRetour);
          
                              return value;
                    }
          
              @Override
                    public String getAsString(FacesContext context, UIComponent component, Object value) {
          
                        //List<String> listeStringDroit = new ArrayList<String>();
          
                        String droit = (String) value;
          
                        //bouvle pour remplir listeStringDroit 
          
              //          listeStringDroit.add(droit);
          
                              System.out.println("converter getAsString : " + value);
          
                              return droit;
          
                    }
          
          
          }
          
          • 2. Re: error listshutle  -  has invalid value expression
            lionceau

            anyone know the answer?