-
1. Re: orderingList how can I get new order ?
nbelaevski Apr 11, 2008 6:28 PM (in response to misqu23)Martin,
"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 ?
baranjsf Aug 1, 2010 3:32 PM (in response to nbelaevski)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 ?
baranjsf Aug 1, 2010 5:44 PM (in response to nbelaevski)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);
resultsList.clear();
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 Aug 2, 2010 6:49 AM (in response to baranjsf)at first add rich:messages to the page to check if the converter works fine.
-
5. Re: orderingList how can I get new order ?
baranjsf Aug 2, 2010 11:31 AM (in response to ilya_shaikovsky)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?
-
6. Re: orderingList how can I get new order ?
baranjsf Aug 2, 2010 11:40 AM (in response to baranjsf)I added massages, no messages.