6 Replies Latest reply on Aug 2, 2010 11:40 AM by Baran Seil Sepour

    orderingList how can I get new order ?

    Marcin Misiewicz Newbie


      I'm using richfaces 3.2. I've got the problem with orderingLst component. I can get selection but I don't know how to get the new order of items ?

      Does anybody knows solution ?

      Thanks in advance


        • 1. Re: orderingList how can I get new order ?
          Nick Belaevski Master


          "value" attribute of orderingList will contain re-ordered collection of original elements after request processing by JSF is complete.

          • 2. Re: orderingList how can I get new order ?
            Baran Seil Sepour Newbie

            Hi there,

            I have this problem too. In my backing bean, the value of ordering list, my list, has old order. Please help me.

            • 3. Re: orderingList how can I get new order ?
              Baran Seil Sepour Newbie

              Hi there,

              I have orderinglist, but I could not get the new order in my backing bean. Would you plz help me?

              It is my ordering list:


              My rankList will be initialized in init() method in my backing bean:


              rankList = new ArrayList<Rank>();
              rankList.add(new Rank("Alabama Montgomery"));
                  rankList.add(new Rank("Alaska Juneau"));
                  rankList.add(new Rank("Arizona Phoenix"));
                  rankList.add(new Rank("Arkansas Little Rock"));
                  rankList.add(new Rank("California Sacramento"));
                  rankList.add(new Rank("Colorado Denver"));
                  rankList.add(new Rank("Connecticut Hartford"));
                  rankList.add(new Rank("Delaware Dover"));
                  rankList.add(new Rank("Florida Tallahassee"));
                  rankList.add(new Rank("Georgia Atlanta"));
                  rankList.add(new Rank("Hawaii Honolulu"));
                  rankList.add(new Rank("Idaho Boise"));

              and it is my findEperts method in my backing bean:


              public void findExperts (){

                  System.out.println("FIND EXPERT:Hi"+rankList);
                  BusinessLogic bs = new BusinessLogic();
                  resultsList = bs.search(searchedTopicList);

              and it is my convertor:


              public class StringToRankListConverter implements Converter {
                  public Object getAsObject(FacesContext context, UIComponent component, String value) {
                      System.out.println("StringToRankListConverter value: "+value.toString());
                      String[] words = value.split (":");
                      String name = words[0];
                      Rank wonder = new Rank(name);
                      return wonder;
                  public String getAsString(FacesContext context, 
                            UIComponent component, Object value) {
                           return value.toString();

              Sometimes  a4j:support calls my findexperts method, and  sometimes does not call. But I saw in my setRankList and getrankList and  findExpert method that the rankList has the old order, not a new order.

              Thank in advance

              • 4. Re: orderingList how can I get new order ?
                Ilya Shaikovsky Master

                at first add rich:messages to the page to check if the converter works fine.

                • 5. Re: orderingList how can I get new order ?
                  Baran Seil Sepour Newbie

                  Hi Ilya,

                  I used System.out.println in my converter.

                  In the converter the order is ok, but in SET and GET accessors, the order is wrong. I do not know y?