Results 1 to 3 of 3

Thread: how to pass form values from 2 forms as extraParams?

  1. #1
    Sencha User
    Join Date
    Dec 2013
    Posts
    52
    Answers
    1
    Vote Rating
    2
      1  

    Default how to pass form values from 2 forms as extraParams?

    I have two forms whos values I want to pass as extraParams to my grid stores proxy, I just dont know the proper syntax

    Code:
    this.getMyGrid().getStore().getProxy().extraParams = this.getForm1().getValues();
    how would i add this.getForm2().getValues() to the above code?
    thx

  2. #2
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    41
    Answers
    5
    Vote Rating
    9
      1  

    Default

    This is how I did it.
    Code:
    lStore.getProxy().extraParams = { };
        	lStore.currentPage = 1;
        	for (i = 0; i < lSearchCriteria.fields.keys.length; i++){
        		var lKey = lSearchCriteria.fields.keys[i];
        		if (lSearchCriteria.get(lKey) != '' &&  lSearchCriteria.get(lKey) != null){
        			hasSearchCirteria = true;
        			console.log('Searching On: ' +  lKey +' = ' + lSearchCriteria.get(lKey) );
        			lStore.getProxy().setExtraParam( lKey, lSearchCriteria.get(lKey));
        		}
        	}

  3. #3
    Sencha User
    Join Date
    Dec 2013
    Posts
    52
    Answers
    1
    Vote Rating
    2
      0  

    Default

    thanks for your response. I ended up using Ext.apply( ); instead.

    Code:
    Ext.apply(this.getMyGrid().getStore().getProxy().extraParams, this.getForm1().getValues(), this.getForm2().getValues());

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •