How to read query string in ExtJS 4?

Shekhar picture Shekhar · Apr 4, 2012 · Viewed 14k times · Source

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

Answer

Özgür Kara picture Özgür Kara · Apr 4, 2012

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