sarathy13
8 Nov 2012, 10:39 AM
Hi,
I have created a store which load the data with server call, i have used Ext.data.HttpProxy in store, when i checked the param in java server side with pRequest.getParameter("name"), it is returning null value always even if i initialize it. I have pasted the code below.
var liveNameStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'Redirector?id=OBAAssignLiveSearch&searchType=NameSearch',
extraParams: {
_postSecurityId: '<c:out value="${_postSecurityId}"/>',
name: 'Test'
}
}),
reader : searchReader
});
I get the query by default, when i typed it in combo, the store will get loaded in combo as below.
var nameFieldCombo = new Ext.form.ComboBox({
id:'nameFieldCombo',
store: liveNameStore,
valueField: 'myId',
displayField: 'displayText',
width: 250,
minChars: 2,
pageSize:5,
typeAhead: false,
hideTrigger:true,
enableKeyEvents:true,
tpl: resultTpl,
itemSelector: 'div.search-item' ,
applyTo: 'liveSearchName',
listeners: {
select: function(combo, selection) {
document.getElementById("liveSearchName").value =selection.get('displayText');
}
}
});
Kindly let me know what is the problem with extraParam.
Sarathy
I have created a store which load the data with server call, i have used Ext.data.HttpProxy in store, when i checked the param in java server side with pRequest.getParameter("name"), it is returning null value always even if i initialize it. I have pasted the code below.
var liveNameStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'Redirector?id=OBAAssignLiveSearch&searchType=NameSearch',
extraParams: {
_postSecurityId: '<c:out value="${_postSecurityId}"/>',
name: 'Test'
}
}),
reader : searchReader
});
I get the query by default, when i typed it in combo, the store will get loaded in combo as below.
var nameFieldCombo = new Ext.form.ComboBox({
id:'nameFieldCombo',
store: liveNameStore,
valueField: 'myId',
displayField: 'displayText',
width: 250,
minChars: 2,
pageSize:5,
typeAhead: false,
hideTrigger:true,
enableKeyEvents:true,
tpl: resultTpl,
itemSelector: 'div.search-item' ,
applyTo: 'liveSearchName',
listeners: {
select: function(combo, selection) {
document.getElementById("liveSearchName").value =selection.get('displayText');
}
}
});
Kindly let me know what is the problem with extraParam.
Sarathy