Fórum
search-container order error
Alexis Araya, modificado 9 Anos atrás.
search-container order error
Junior Member Postagens: 37 Data de Entrada: 08/10/13 Postagens Recentes
hi,
I using : Liferay 6.1 CE
I'm trying to implement the function of order in a search-container,
sort the list but coming from my service, it throws an exception.
".UnsupportedOperationException: Please make a copy of This read-only list before modifying it."
The exception occurs when the following code.
Any idea? thank you
I using : Liferay 6.1 CE
I'm trying to implement the function of order in a search-container,
sort the list but coming from my service, it throws an exception.
".UnsupportedOperationException: Please make a copy of This read-only list before modifying it."
The exception occurs when the following code.
List<formtravelrequest> lista_all = FormTravelRequestLocalServiceUtil
.getFormsByGroupId(PortalUtil
.getScopeGroupId(renderRequest),
-1,
-1);
<liferay-ui:search-container emptyresultsmessage="form-empty-results-message" orderbycol="<%= orderByCol %>" orderbytype="<%= orderByType %>">
<liferay-ui:search-container-results>
<%
List<formtravelrequest> lista_orden = lista_all;
OrderByComparator orderByComparator =
CustomComparatorUtil.getUserOrderByComparator(orderByCol, orderByType);
Collections.sort(lista_orden,orderByComparator);
pageContext.setAttribute("results", ListUtil.subList(
lista_orden, searchContainer.getStart(),
searchContainer.getEnd()));
pageContext.setAttribute("total", lista_orden.size());
%>
</formtravelrequest></liferay-ui:search-container-results></liferay-ui:search-container></formtravelrequest>
Any idea? thank you
Nagendra Kumar Busam, modificado 9 Anos atrás.
RE: search-container order error
Liferay Master Postagens: 678 Data de Entrada: 07/07/09 Postagens Recentes
Can you try using the same lista_all instead of lista_orden & remove line # 11
Tameez Lal, modificado 9 Anos atrás.
RE: search-container order error
New Member Postagens: 20 Data de Entrada: 25/10/13 Postagens Recentes
Hello,
Some times UnsupportedOperationException will occur placing service jar in two places .I have also encountered with UnsupportedOperationException and i resolved make sure that you have service jars in two place if YES please remove service jar from porltet lib folder. If you have placed the service jar globally under tomcat/lib/ext then you should remove the service jar from portlet lib folder.
Some times UnsupportedOperationException will occur placing service jar in two places .I have also encountered with UnsupportedOperationException and i resolved make sure that you have service jars in two place if YES please remove service jar from porltet lib folder. If you have placed the service jar globally under tomcat/lib/ext then you should remove the service jar from portlet lib folder.
Jitendra Rajput, modificado 9 Anos atrás.