Ext


Go Back   Ext JS Forums > Ext JS Community Forums (3.0) > Ext: Help

Reply
 
Thread Tools
  #1  
Old 09-30-2009, 02:41 AM
nayak14 nayak14 is offline
Ext User
 
Join Date: Sep 2009
Posts: 31
nayak14 is on a distinguished road
Default Combo does not query again for the same text.

Hi,
I am using combo with the autocomplete feature. min text length is set to 3 chars.
when i first time search it queries and bring the relevant data matching the text.
next time it works for same text since store has the records.

now i clear the store for some reason and again try to search with the same text, it doesnt query to bring the records.

what needs to be reset?

any clue?
Reply With Quote
  #2  
Old 09-30-2009, 03:51 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 24,303
Animal will become famous soon enough
Default

Show code
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #3  
Old 09-30-2009, 09:18 AM
nayak14 nayak14 is offline
Ext User
 
Join Date: Sep 2009
Posts: 31
nayak14 is on a distinguished road
Default

new Ext.form.ComboBox({
id:
'appNameSearch',
name:
'appNameSearch',
nowrap:
true,
store: a2rm.application.gridlist.store,
displayField:
'name',
fieldLabel:
'Search',
emptyText :
'Search app name...',
forceSelection:
true,
valueField:
'id',
typeAhead:
true,
loadingText:
'Searching...',
width: 200,
listWidth:300,
pageSize:10,
minChars:3,
hideTrigger:
true,
mode:
'remote',
allowBlank:
false,
selectOnFocus:
true,
valueNotFoundText:
'',
enableKeyEvents:
true,
queryDelay: 1000,
listeners:{
select :
this.loadAppDetails,
beforequery :
function (evt)
{
if(this.getRawValue().length > 2)
{
//alert('/ARM/API/applications/?qbw='+this.getRawValue());
this.store.proxy.setUrl( '/ABC/XYZ/apps/?qbw='+this.getRawValue()) ;
}
else
returnfalse;
}
}
})

qbw id query begins with which is interpreted by the service to return the results.

Thanks!!
Reply With Quote
  #4  
Old 09-30-2009, 09:19 AM
nayak14 nayak14 is offline
Ext User
 
Join Date: Sep 2009
Posts: 31
nayak14 is on a distinguished road
Default

new Ext.form.ComboBox({
id:'appNameSearch',
name:'appNameSearch',
nowrap: true,
store: xyz.application.gridlist.store,
displayField:'name',
fieldLabel: 'Search',
emptyText : 'Search app name...',
forceSelection: true,
valueField:'id',
typeAhead: true,
loadingText: 'Searching...',
width: 200,
listWidth:300,
pageSize:10,
minChars:3,
hideTrigger:true,
mode:'remote',
allowBlank: false,
selectOnFocus: true,
valueNotFoundText: '',
enableKeyEvents: true,
queryDelay: 1000,
listeners:{
select : this.loadAppDetails,
beforequery : function (evt)
{
if(this.getRawValue().length > 2)
{
this.store.proxy.setUrl( '/ABC/XYZ/apps/?qbw='+this.getRawValue()) ;
}
else
returnfalse;
}
}
})

qwb is our application specific param for the webservice it means "query starts with"
Reply With Quote
  #5  
Old 09-30-2009, 01:39 PM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 24,303
Animal will become famous soon enough
Default

You're going to need to format that before anyone reads it.

No color tags, no font tags, just [code]...[/code] tags round it.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #6  
Old 10-01-2009, 02:48 AM
nayak14 nayak14 is offline
Ext User
 
Join Date: Sep 2009
Posts: 31
nayak14 is on a distinguished road
Default

why no color codes?
Reply With Quote
  #7  
Old 10-01-2009, 03:27 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 24,303
Animal will become famous soon enough
Default

why color codes?
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #8  
Old 10-01-2009, 04:40 AM
nayak14 nayak14 is offline
Ext User
 
Join Date: Sep 2009
Posts: 31
nayak14 is on a distinguished road
Default

done!
Reply With Quote
  #9  
Old 10-01-2009, 05:08 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 24,303
Animal will become famous soon enough
Default

I sometimes wonder what goes on here?

I know people don't read their own code, but just copy/paste any old thing they find on the interwebs, close their eyes tightly and wish for it to work.

But it also seems that people don't even glance at their own posts!

Nobody will attempt to read that code! You try it! Not easy is it?
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #10  
Old 10-01-2009, 05:33 AM
mankz's Avatar
mankz mankz is offline
Ext User
 
Join Date: Nov 2007
Location: Lund, Sweden
Posts: 721
mankz is on a distinguished road
Send a message via MSN to mankz Send a message via Skype™ to mankz
Default

@Animal: Just updated my formatting bookmarklet with selection support. You'll need it I think
__________________
Why bother with subroutines when you can type fast?
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 01:51 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.