-
1. Re: How to actually use rich:orderingList
ilya_shaikovsky Jan 28, 2010 5:55 AM (in response to glammy) -
2. Re: How to actually use rich:orderingList
glammy Jan 28, 2010 2:20 PM (in response to ilya_shaikovsky)Both onorderchanged and onorderchange yield the same result. -
3. Re: How to actually use rich:orderingList
ilya_shaikovsky Jan 29, 2010 4:11 AM (in response to glammy)checked with richfaces-demo code under 3.3.3 snapshot. onorderchanged works just as you expects. And onorderchange works as described in your problem - but it's designed behavior - this event risen before actual order change. -
4. Re: How to actually use rich:orderingList
glammy Jan 31, 2010 2:29 PM (in response to ilya_shaikovsky)Still not working here, Richfaces 3.3.2.SR1
<rich:orderingList binding="#{routeController.stopsTable}"
var="stop" value="#{routeController.stopsList}"
converter="#{stopListConverter}" showButtonLabels="false"
listWidth="500" listHeight="150" id="stopsTable"><a4j:support event="onorderchanged" ajaxSingle="true"
immediate="true" action="#{routeController.listReordered}" />....
</rich:orderingList>
The converter gets the List reference, and finds the item by name (correctly).
When I put System.out.println(stopsList); in the listReordered() method, it outputs the same sequence of objects after each reorder.
I tried removing the "binding" temoporarily - doesn't work
Using what code did you make it work?
-
5. Re: How to actually use rich:orderingList
nbelaevski Jan 31, 2010 6:42 PM (in response to glammy)Hi,
You are using a4j:support that has immediate="true" and that prevents model beans from updating. See documentation for "immediate" attribute for more information.
-
6. Re: How to actually use rich:orderingList
glammy Feb 1, 2010 2:21 AM (in response to nbelaevski)Yes, I'm aware of what "immediate" is doing, but this one seems to have slipped through my fingers.
Perhaps because I don't want to validate (and eventually fail the validation) of other field in the page. But ajaxSingle should take care of that and not submit those.
Thanks
-
7. Re: How to actually use rich:orderingList
baranjsf Aug 1, 2010 5:41 PM (in response to glammy)Hi there,
I have source code like Bozhidar, 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
-
8. Re: How to actually use rich:orderingList
ilya_shaikovsky Aug 2, 2010 6:50 AM (in response to baranjsf)http://community.jboss.org/message/555322#555322 - do not duplication questions please or you will loose the thread where we trying to answer.