Hi Eric,
IMO you shouldn't do queries like that. If you want a query, we provide HST
Query, see
http://www.onehippo.org/library/concepts/search/hst-2-search.html
But in your case, the easiest way is get the linked folder and then iterate it's
contents, for example:
document.getLinkedBean("yournamspace:mirrorproperty",
HippoFolder.class).getDocuments(HippoGalleryImageSet.class);
There are other methods available too, the main idea is to use beans.
HTH
Jeroen
Eric Nguyen personal wrote on 03-03-2015 09:00:
> I've found the XPath expression and I can correctly get the images under an
> image folder:
>
> <
https://lh6.googleusercontent.com/-nbO0xszcU1I/VPVqEnG-OWI/AAAAAAAADMI/WERWtlFuMGM/s1600/Screen%2BShot%2B2015-03-03%2Bat%2B3.58.57%2Bpm.png>
>
> |
> /jcr:root/content/gallery/scc/gallery1//element(*, hippo:handle)
> |
>
>
> I'm trying the following function in my bean class but I'm getting
> ClassCastException:
>
> |
> publicList<HippoGalleryImageSet>getImages(){
>
log.info("getImages");
> List<HippoGalleryImageSet>images =newArrayList<HippoGalleryImageSet>();
> Stringexpression ="/jcr:root/content/gallery/scc/gallery1//element(*,
> For each event there is a link which points to a *folder* under *Images*.
>
>
> <
https://lh4.googleusercontent.com/-BKeWZIotIKQ/VPUkLMRyBmI/AAAAAAAADLo/ANORDe2BHH4/s1600/Screen%2BShot%2B2015-03-03%2Bat%2B11.01.31%2Bam.png>
>
> <
https://lh6.googleusercontent.com/-3zZcomnr9F4/VPUkbO_ojII/AAAAAAAADL4/jm4yezPaxzg/s1600/Screen%2BShot%2B2015-03-03%2Bat%2B10.58.16%2Bam.png>
>
>
>
>
> How do I get all the images in such folder to display on my Event details page?
>
> *Notes: I'm not using multiple image fields for my Event document type
> because I don't want my users to have to 10 times upload an image to achieve
> a gallery!
>
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to
hippo-c...@googlegroups.com
> RSS:
https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups "Hippo
> Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
hippo-communi...@googlegroups.com
> <mailto:
hippo-communi...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/hippo-community.
> For more options, visit
https://groups.google.com/d/optout.