Thank's Marc, my jsp can sort the container list, I
haven't problems with the jsp file.
My problem is, when I use this code into a TagLib
(this tag-lib has been created by me), this does not
work correctly.
The filter it works, but the sort no. In my Tag I put
on the request where sorter is -->
pageContext.getRequest().setAttribute(nombre +
"_sort_handler", sorter);
and on the sort I put
--> pageContext.getRequest().setAttribute(nombre +
"_filter_handler", filtrar);
// Create the sort handler for the container list
"nombre"
ContainerSorterByContainerDefinition sorter = new
ContainerSorterByContainerDefinition(-1,sortField,nombre,jParams.getEntryLoadRequest(),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.
I have a big problem whit my tags.
I whould like know if someone have a library of tags
for jahia that I can use, thank's.
--- Marc Cardle <[EMAIL PROTECTED]> escribió:
> Hi Jose,
>
>
>
> At first glance, your syntax seems correct. Without
> the rest of your JSP
> code, its 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
>
>
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es