Search code examples
extjs4query-string

How to read query string in ExtJS 4?


I have an ExtJS application which is invoked with some query string parameters. I would like to know how to read those parameters and their values using ExtJS 4.

My ExtJS application URL will look like the following:

http://localhost:8080/myapp?candidate_id=101&candidate_id=102&candidate_id=103

Solution

  • You can use Ext.Object.fromQueryString like this

    Ext.Object.fromQueryString('candidate_id=101&candidate_id=102&candidate_id=103')
    

    http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Object-method-fromQueryString