1. #1
    Ext User
    Join Date
    Jul 2009
    Posts
    2
    Vote Rating
    0
    richolsn is on a distinguished road

      0  

    Default Combox 'query' Parameter and DirectProvider

    Combox 'query' Parameter and DirectProvider


    I would like to enable my combo box to pass the current input that's in the textbox, on to the server. I don't see a way to do this with DirectProvider. I have successfully gotten a .NET implementation to return values back to the client, but am unable to figure out how to tell the api to pass the query into my method.

    Any help is appreciated.

    Here is what I currently have:

    Code:
    Ext.onReady(function() {
      	var menuStore = new Ext.data.DirectStore({
      		autoLoad: false,
      		directFn: Sample.getNames,
      		paramsAsHash: false,
      		idProperty: 'personId',
      		fields: ["personId", "firstName", "lastName"]
      	});
      	menuStore.on("exception", function(sender, type, action, options, response, arg) {
      		debugger;
      		//alert("exception");
      	}, menuStore);
    
    
      	var menuCbx = new Ext.form.ComboBox({
      		id: 'mypersoncbx',
      		hiddenName: 'personId',
      		displayField: 'firstName',
      		valueField: 'personId',
      		store: menuStore,
      		queryDelay: 1,
      		//mode: 'remote',
      		minChars: 0,
      		forceSelection: true,
      		//emptyText: 'Men',
      		renderTo: cb,
      		typeAhead: true,
      		editable: true,
      		forceSelection: true,
      		enableKeyEvents: true,
      		listeners: {
      			keydown: function(textField, e) {
      				//when user presses '.', force requery
      				if (e.getCharCode() == 190) {
      					//delete this.combo.lastQuery;
      					debugger;
      					this.doQuery('sometext', true);
      				}
      			}
      		}
      	});
    Last edited by evant; 5 Jul 2009 at 6:06 PM. Reason: Please post code in [code][/code] tags

  2. #2
    Ext User
    Join Date
    Jul 2009
    Posts
    2
    Vote Rating
    0
    richolsn is on a distinguished road

      0  

    Default


    to answer my own question..

    You need to add the following parameter to the store creation:
    paramOrder: ["query"],


    Also, a new string parameter added to your server method. Presto, works like magic.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar