PDA

View Full Version : Deep Linking/Routing in ExtJS4



sissonb
12 Apr 2012, 9:54 AM
I am trying to setup deep linking in ExtJS4. To do this I first tried adding a the route config property to my controller like it's done in Sencha Touch 2. This didn't work for me.

Next I did some research and found this. http://all-docs.info/extjs4/docs/source/Application.html
I tried using the Ext.Router.draw() method to setup my routes, but this failed too. Also it's messy

So how are routes setup in ExtJS4?

Thanks!

mitchellsimoens
13 Apr 2012, 7:51 AM
Ext JS 4 doesn't have the route config system, that is special to Sencha Touch 2.

You should check out the History example that comes with Ext JS 4. It won't work in the API docs as the API docs use history and they will conflict but it comes in the downloaded examples directory.

similian
26 Jul 2012, 6:49 AM
Could we have this aligned or implemented?

I like both systems but i would really enjoy using only one :">

Edit:
Also update docs please. The example really does not help.
It is not broken, yet not very helpful !
There is no alternative description in docs.

I guess it would be sufficient to describe the functionality.

Ed is saving the world again:
http://edspencer.net/2009/01/why-you-should-be-using-history-in-your.html (http://edspencer.net/2009/01/why-you-should-be-using-history-in-your.html)


Cheers

aeiou
22 Nov 2012, 4:34 AM
Ext JS 4 doesn't have the route config system, that is special to Sencha Touch 2.

You should check out the History example that comes with Ext JS 4. It won't work in the API docs as the API docs use history and they will conflict but it comes in the downloaded examples directory.
Yes, I did something like deep linking but needs to be polished a bit. Basically is based on History, as Mitchell says, and a Viewport controller to manage History changes. When you request a URI related to application, lets say i.e. http://localhost/myapp/!#c=something, that means a history change is fired and, in an event callback, you can process the token and show the requested application part based on, i.e, c parameter (here).

I guess It can be seen as a rudimentary routing and, as I said needs to be polished, but the point is in the history and the main application controller (in my case related to my Viewport).

Hope it helps a bit