Closed GoogleCodeExporter closed 9 years ago
Original comment by jus...@gmail.com
on 23 May 2014 at 2:01
From Gergely: " ... had the same problem before. Unfortunately you have to hack
into the code.
You should find the following class: QueryPanel.js
Change the following method:
wrapWildCards: function (filter) {
if (filter instanceof OpenLayers.Filter.Logical) {
// Go recursively through composite filter
for (var i = 0, len = filter.filters.length; i < len; ++i) {
filter = this.wrapWildCards(filter.filters[i]);
}
} else if (filter.type === OpenLayers.Filter.Comparison.LIKE) {
// Wrap the value in Wildcard strings.
filter.value = this.wildCardString + filter.value + this.wildCardString;
}
return filter;
},
to this:
wrapWildCards: function (filter) {
if (filter instanceof OpenLayers.Filter.Logical) {
//Fegyi's hack
if(!typeof filter.filters === "undefined") {
// Go recursively through composite filter
for (var i=0; i<filter.filters.length; i++) {
filter = this.wrapWildCards(filter.filters[i]);
}
}
} else if (filter.type === OpenLayers.Filter.Comparison.LIKE) {
// Wrap the value in Wildcard strings.
filter.value = this.wildCardString + filter.value + this.wildCardString;
}
return filter;
},
And after that, into your html after adding gxp.js, add the modified
QueryPanel.js as well."
Original comment by jus...@gmail.com
on 23 May 2014 at 2:17
Fixed and verified in GXP, see example
http://lib.heron-mc.org/heron/latest/examples/querybuilder/
Many thanks to Gergely !
We will try to backport to GXP, via
https://github.com/boundlessgeo/gxp/issues/191 but the ux/gxp in Heron at least
is fixed.
Original comment by jus...@gmail.com
on 23 May 2014 at 2:57
Original issue reported on code.google.com by
Martijn....@gmail.com
on 23 May 2014 at 9:15