RE: Jahia 4.0.3 problems with sort in tags

"Marc Cardle" <[email protected]>
Newsgroups gmane.comp.cms.jahia.devel
Message-ID <[email protected]>
Hi Jose,

 

At first glance, your syntax seems correct. Without the rest of your JSP
code, it’s hard to tell what exactly might be the source of the behaviour.

 

Have you tried your code on Jahia 4.0.6 ? If it works, then I suggest you
upgrade since version 4.0.3 is rather dated.

 

Note also that the following line is redundant:

 

      if (sortType.equals("numeric")) {sorter.setNumberOrdering(true); }

 

Hope this helps,

 

Marc

 

 

-----Original Message-----
From: jose alberto g [mailto:[email protected]] 
Sent: 06 July 2005 14:39
To: [email protected]
Subject: Jahia 4.0.3 problems with sort in tags

 

Hello, I have some problems with sorting in Jahia.

I make a new tag for jahia using her classes.

 

Using this code to sort I haven't problems but if I

add  this code in my tag the container is show

unsorted.

 

<%

 

//-----------------------------------------------------------

      // Manejador de Ordenacion

 

//-----------------------------------------------------------

      String sortField = "fecha";

      String sortOrder = "desc";

      String sortType  = "normal";

 

      // Create the sort handler for the container list

"nombre"

      ContainerSorterByContainerDefinition sorter = new

ContainerSorterByContainerDefinition(-1,sortField,nombre,jParams.getEntryLoa
dRequest(),true);

      // Fuerza a que antes de la comparacion se convierta

el valor del campo a su representacion en numero

(long)

      if (sortType.equals("numeric")) {

sorter.setNumberOrdering(true); }

      if (!sortOrder.equals("asc")) {

sorter.setDescOrdering(); }

      // Almacena el manejador de ordenacion en el objeto

de respuesta.

      // Esto sera usado despues por el container list

loader.

      request.setAttribute(nombre + "_sort_handler",

sorter);

%>

 

 

 

      

      

            

______________________________________________ 

Renovamos el Correo Yahoo! 

Nuevos servicios, más seguridad 

http://correo.yahoo.es
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.