[Hippo-cms7-user] [Hippo Hilter on HSTQuery] - date problem
j.reijn at onehippo.com
Wed Apr 20 08:34:01 CEST 2011
you do not need to put the quotes and xs:dateTime( in yourself.
I'm doing it like:
Filter dateFromFilter = query.createFilter();
the xs:dateTime is added by the HST through inspection of the input type. If
you provide a type of date it will add the xs:dateTime automatically.
On Wed, Apr 20, 2011 at 2:04 AM, senofonte <senofonte123 at gmail.com> wrote:
> i had a problem using the HSTQuery with a lot of filters wich one is a
> For Each AND Filter I Use this kind of code:
> Filter titleFilter = hstQuery.createFilter();
> titleFilter.addContains("@mynamespace:field", "fieldvaluetocheck");
> It works for all the AND Filters, but when I add a Filters for a Date (it's
> an Advanced Search Form)
> using and expression like:
> Filter f = new FilterImpl();
> f.addLessOrEqualThan("@namespace:dateField", "xs:dateTime('" +
> xmlCal.toXMLFormat() + "')");
> (where xmlCal it's a XmlGregorianCalendar)
> the method addLessOrEqualThan (and also the others method) don't evaluate
> the xs:dateTime
> and use that expression like a String, so the HstQuery produced it's
> something like ... <= 'xs:dateTime(...)'.
> How can I disabile the "'"?
> I Also tried to add a Filter with addJCRExpression(), but the normal
> and a JCRExpression Filter cant' find nothing.
> View this message in context:
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> Hippo-cms7-user mailing list and forums
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Hippo-cms7-user