[Users] wildcart in search panel and convert text to uppercase
Alejandra Castro
alejovi100 at gmail.com
Tue May 28 14:15:22 CEST 2013
I know this question is a little dumb but I have a issue. How I can
use a search panel without using wildcards ? and how I can convert the
text to uppercase?.
for example I use this code from here:
http://ian01.geog.psu.edu/geoserver_docs/apps/gaz/index.html
var formPanel = new GeoExt.form.FormPanel({
title: "Buscador de Nombres",
height: 150,
region: "north",
protocol: protocol,
items: [{
xtype: "textfield",
width: 200,
name: "Name__like",
fieldLabel: "Nombre<br />(use * y % para buscar)",
allowBlank: false,
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
formPanel.search();
// info.deactivate();
}
}
}
}],
listeners: {
actioncomplete: function(form, action) {
features = action.response.features;
store.loadData(features);
vm=map.getLayersByName("Resultado");
if(vm.length===0){
vecLayer = new OpenLayers.Layer.Vector("Resultado");
map.addLayer(vecLayer);
store.bind(vecLayer);
select.bind(vecLayer);
}
}
}
});
formPanel.addButton({
text: "buscar",
handler: function() {
this.search();
},
scope: formPanel
});
works fine, but user always have to put * or % there is a way to put *
implicit, or when user writes Andrea instead of ANDREA don't search
anything. How Can I convert this string to uppercase ?
Thanks in advance.
More information about the Users
mailing list