baldwasagar
20 Oct 2008, 6:30 AM
Hi,
I am using Ext.form.ComboBox for a pagenation dropdown. I want to wrap the text which is diplayed in the drop down.
Also, it is possible to apply "tolltip" for each record in dropdown which can be seen while scrolling over the data displayed in drop down before selecting any one record.
This is the code I have written in my JSP file. I have added the .css and .js files required for Ext.form.ComboBox:
<div>
<input property="clinicalDiagnosis" type="text" id="clinicaldiagnosis" name="clinicalDiagnosis"
value="<%=request.getAttribute("clinicalDiagnosis")%>" onmouseover="showTip(this.id)"/>
</div>
This is my combos.js file code:
Ext.onReady(function(){
// Ext.QuickTips.init();
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'ComboDataAction.do'
}),
reader: new Ext.data.JsonReader({
root: 'row',
totalProperty: 'totalCount',
id: 'id'
}, [
{name: 'excerpt', mapping: 'field'}
])
});
var combo = new Ext.form.ComboBox({
store: ds,
displayField:'excerpt',
typeAhead: true,
width: 200,
pageSize:15,
forceSelection: true ,
queryParam : 'query',
mode: 'remote',
triggerAction: 'all',
minChars : 1,
selectOnFocus:true,
applyTo: 'clinicaldiagnosis'
});
});
Thanks in advance!
~Sagar
I am using Ext.form.ComboBox for a pagenation dropdown. I want to wrap the text which is diplayed in the drop down.
Also, it is possible to apply "tolltip" for each record in dropdown which can be seen while scrolling over the data displayed in drop down before selecting any one record.
This is the code I have written in my JSP file. I have added the .css and .js files required for Ext.form.ComboBox:
<div>
<input property="clinicalDiagnosis" type="text" id="clinicaldiagnosis" name="clinicalDiagnosis"
value="<%=request.getAttribute("clinicalDiagnosis")%>" onmouseover="showTip(this.id)"/>
</div>
This is my combos.js file code:
Ext.onReady(function(){
// Ext.QuickTips.init();
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'ComboDataAction.do'
}),
reader: new Ext.data.JsonReader({
root: 'row',
totalProperty: 'totalCount',
id: 'id'
}, [
{name: 'excerpt', mapping: 'field'}
])
});
var combo = new Ext.form.ComboBox({
store: ds,
displayField:'excerpt',
typeAhead: true,
width: 200,
pageSize:15,
forceSelection: true ,
queryParam : 'query',
mode: 'remote',
triggerAction: 'all',
minChars : 1,
selectOnFocus:true,
applyTo: 'clinicaldiagnosis'
});
});
Thanks in advance!
~Sagar