Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

SortingColumn

hi,
I have used the Beancompartor to sort the column values, its working but unable to produce the correct result of any one column, we are iterating the rows object in jsp and used the code for ascending or descending order given in the

List list = new ArrayList();
list.addAll(formRowObject );
String sortBy = request.getParameter("sortBy");
if(sortBy != null) {
BeanComparator comparator = new BeanComparator(sortBy);
Collections.sort( list, comparator );
}

return mapping.findForward("success");
*****
[637 byte] By [bhrigu] at [2007-11-11 7:36:01]