1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    48
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default Unanswered: How to get value of a combobox in a proxy store?

    Unanswered: How to get value of a combobox in a proxy store?


    I have a store that sends a parameter to my controller. When I define my store

    Code:
        proxy: {
                    type: 'ajax',
                    scope: this,
                    url: 'My/GetData',
                    extraParams: {
                        parametervalue: Ext.getCmp('Combo').getValue() //something similar
                       }
              }
    I am not updating the store on combo selection. Or else I could have just added a listener on combo and updated the store.
    I want to get the value of the combobox when the grid is loaded. It also works with paging, so when the user hits next page the store loads the second page "with" the selected value in the combobox, which it passes to my controller.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,395
    Answers
    3548
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    So the store is already created so the getValue is going to happen too soon correct? You could have a beforeload event listener to add in a param.

    Or when the change event fires on the combo, add that value to the extraParams of the store.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    48
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default


    Hi Mitchell... thanks for your response... i think i know what you are talking about but not sure how to go about doing that on extjs... m totally new to this.. could you please show me an example of what you just explained... i'd really appreciate... thanks
    Quote Originally Posted by mitchellsimoens View Post
    So the store is already created so the getValue is going to happen too soon correct? You could have a beforeload event listener to add in a param.

    Or when the change event fires on the combo, add that value to the extraParams of the store.

Thread Participants: 1

Tags for this Thread