Re: Sorting Question

"Jinesh Parekh" <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Hey

Thank you very much. it worked.

Jinesh

>From: Philippe Vollenweider <[email protected]>

>Reply-To: <[email protected]>

>To: <[email protected]>

>Subject: Re: Sorting Question

>Date: Tue, 01 Jun 2004 10:20:26 +0200

>

>Hello,

>

>Please try to use the entryLoadRequest in the ContainerSorterBean

>constructor with

>

> ContainerSorterBean sorter =

> new

>ContainerSorterBean("glossContainer",jParams,glossSort,jParams.getEntryLoadRequest());

>

>Philippe.

>

>

>At 28.05.2004 16:52, you wrote:

>

>>Hi

>>

>>I am trying to sort a glossary container. As soon as I put the sort

>>logic in it, all the contents dissappear instead of sorting. So in

>>short the sorting is not working. Below is the code that I am

>>trying to use.Please advice.

>>

>>

>>

>>-Jinesh

>>

>><%

>>String glossSort = request.getParameter("glossContainer_sort");

>>if ( glossSort == null ){System.out.println("RAJAAAAAAAAA");

>>glossSort = "glossaryTerm"; // By default, no Sort required.

>>}

>>

>>String glossSortOrder =

>>request.getParameter("glossContainer_sort_order");

>>if ( glossSortOrder == null ){

>> glossSortOrder = "asc"; // By default set to Ascending.

>> }

>>if ( !glossSort.equals("none") ){

>>ContainerSorterBean sorter = new

>>ContainerSorterBean("glossContainer", jParams,glossSort);

>>

>>// Store the sort handler in the request object.

>>// It will be used later by the container list loader.

>>request.setAttribute("glossContainer_sort_handler", sorter);

>>}

>>%>

>>

>><content:declareContainerList name="glossContainer" title="Glossary

>>container">

>> <content:declareContainer>

>> <content:declareField name="glossaryTerm"

>> title="Term"

>> titleKey="term"

>> bundleKey="<%=resBundleID%>"

>> type="SharedSmallText"

>> />

>> <content:declareField name="glossaryAcronym"

>> title="Acronym"

>> titleKey="acr"

>> bundleKey="<%=resBundleID%>"

>> type="SharedSmallText"

>> />

>> <content:declareField name="glossDesc"

>> title="Description"

>> titleKey="description"

>> bundleKey="<%=resBundleID%>"

>> type="BigText"

>> />

>> </content:declareContainer>

>></content:declareContainerList>

>>

>><%

>>

>>int containerID = -1;

>>try {

>> containerID =

>>Integer.parseInt(request.getParameter("containerID"));

>>} catch (NumberFormatException nfe) {

>> logger.debug("NumberException : " + nfe.toString());

>>}

>> %>

>>

>><jahia:containerList name="glossContainer" title="Glossary

>>container" windowSize="5">

>></jahia:containerList>

>><table width="100%" border="0" cellspacing="0" cellpadding="2">

>>

>><%

>>String dirPeopleScrollValue =

>>request.getParameter("ctnscroll_glossContainer");

>>JahiaContainerList glossContainerList =

>>jData.containers().getContainerList( "glossContainer" );

>>Enumeration glossEnumeration = glossContainerList.getContainers();

>>

>>int rowColorCount = 0;

>>String rowColor = "

>>

>>

>

>-------=[ pvollenweider at jahia dot com ]=---------

>Jahia : A collaborative source CMS and Portal Server

>www.jahia.org Community and product web site

>www.jahia.com Commercial services company

>

>
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.