[OpenLayers-Users] Re: combine two OCG filters
Lee M.
w_ward_W at hotmail.com
Sat Apr 14 02:27:36 EDT 2012
i trie:
var id_filter = new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
matchCase:false,
property: 'id',
value:(document.getElementById("searchText")).value
});
var name_filter = new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LIKE,
matchCase:false,
property: 'name',
value: "*" +(document.getElementById("searchText")).value + "*"
});
var orFilter = new Array();
orFilter.push(id_filter);
orFilter.push(name_filter);
wfsProtocol.read({
filter: new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.OR,
filters: orFilter
}),
callback: processTheQuery,
scope: strategy
})
*and still, the id_filter works fine. but the name_filter i got the error:
ERROR: invalid input syntax for integer: "test name"
i on't understand why it should be integer !!
and if i try name_filter alone, it works fine !*
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/combine-two-OCG-filters-tp4827842p4880908.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list