Jahia in English > Filter a ContainerList...

0 (0 Good)
0 (0 Bad)

Filter a ContainerList with a containerQuery on the container ID

by  dr_greenthumb »  2012/05/02 15:48

Hello,

I'm trying to filter a containerList with the container Id.

Actually  I have a java List in my jsp (let's call it myList) containing some ids. What I want to achieve is to display only the containers witch id is not in the Java List.

Stuff like this...

<template:containerList id="myListId" >
          <query:containerQuery>

                    <magicFilterTest: <% myList.contains(container.ID)%> value ="false">

         </query:containerQuery>
</template:containerList>

Does somebody have some hints or magic tricks to implement this ?

Thx a lot

 

 

  • Filter a ContainerList with a containerQuery on the container ID
    2012/05/02 15:48

    dr_greenthumb <p> Hello,</p> <p> I&#39;m trying to filter a containerList with the container Id.</p> <p> Actually&nbsp; I have a java List in my jsp (let&#39;s call it myList) containing some ids. What I want to achieve is to display only the containers witch id is not in the Java List.</p> <p> Stuff like this...</p> <p> &lt;template:containerList id=&quot;myListId&quot; &gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;query:containerQuery&gt;</p> <p> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;magicFilterTest: &lt;% myList.contains(container.ID)%&gt; value =&quot;false&quot;&gt;</p> <p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/query:containerQuery&gt;<br /> &lt;/template:containerList&gt;</p> <p> Does somebody have some hints or magic tricks to implement this ?</p> <p> Thx a lot</p> <p> &nbsp;</p> <p> &nbsp;</p>

  • Number of messages  2
    Registration date May 2, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: Filter a ContainerList with a containerQuery on the container ID

    by  pap@commaro.com »  2012/05/13 22:25

    Hello,

    there are tricks to do it. Could you just let me know, if there are other positive constraints and not just the negative ones (ids of containers, which should not be displayed)? Are the containers to be displayed all part of just one container list or of a certain container definition? I mean do you already have some constraints within the <query:containerQuery> tag and now you just want to add the constraint with the ids which should not be returned?

    How long can the list of excluded ids become?

    Regards,
    Benjamin

    Benjamin Papez (pap@commaro.com)

    Number of messages  220
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page