0 Replies Latest reply on Dec 14, 2010 6:05 PM by mootje

    listShuffle problem

    mootje

      i'm having a probleme with listShuffle

        i cant load the SourceValue  , i'm usinng a List of String  here is the code that i'm using

       

      <rich:listShuttle id="myListShuttle"
      orderControlsVisible="false"
      immediate="true"
      fastMoveControlsVisible="false"
      fastOrderControlsVisible="false"
      sourceValue="#{adduser.examList}"
      targetValue="#{adduser.selExamsList}"
      sourceRequired="true"
      targetRequired="true"
      var="items"
      sourceCaptionLabel="Examens"
      targetCaptionLabel="Examens Selectionne">
      </rich:listShuttle>

                                                   <rich:listShuttle id="myListShuttle"

      orderControlsVisible="false"

      immediate="true"

      fastMoveControlsVisible="false"

      fastOrderControlsVisible="false"

      sourceValue="#{adduser.examList}"

      targetValue="#{adduser.selExamsList}"

      sourceRequired="true"

      targetRequired="true"

      var="items"

      sourceCaptionLabel="Examens"

      targetCaptionLabel="Examens Selectionne">

      </rich:listShuttle>

       

       

      and this code contains in the managebean

       

       

       

           private UserService userService;

      private ExamService examService;

      private List<String> examList;

      private List<String> selExamsList;

      private List<Exam> exams;

       

      + getters and setters

       

      //this is done directy after creating instance

      @PostConstruct

      public void initialize()

      {

                       // this gets the data from database works (tested )

      this.exams = examService.chargerTout();

                     // examList value binded to source value

      this.examList = new ArrayList<String>();

                     //targetValue empty

      this.selExamsList =  new ArrayList<String>();

      //adding values to the SourceValue

      for (int i = 0; i < this.exams.size(); i++) {

      this.examList.add(this.exams.get(i).getExamname());

      }

        

      this.message="";

        this.user=new Users();

       

      }

       

       

      the examList attribut is filled directly after the instance is created so it should be filled and normaly i don't need a converter because i'm using strings

      i hope somebody is going to respond quick thanks