PDA

View Full Version : What is the Ext equivalent of redirectTo in Sencha Touch 2?



mark0978
15 Aug 2013, 10:07 AM
We have this history thing, but redirectTo appears to be missing.

mitchellsimoens
18 Aug 2013, 8:52 AM
At SenchaCon 2013 in Orlando in July I talked about new route functionality that is coming in Ext JS which will have the redirectTo functionality. If you are using Ext JS 4.2 I have code on my GitHub that will allow you to use the routes and have a seamless upgrade to the actual version when we ship it. https://github.com/mitchellsimoens/4.2-Router

stewardsencha
17 Oct 2013, 11:25 AM
Here is the video.

http://www.youtube.com/watch?v=IxQ3A7ExVN4&list=PL6F9Ss2VSSeJHggI0h57seqVec8xuWCA4&index=52

But I will need forty minutes and an amplifier.

Is there any other place to get an insight on how to set up routes in the controller?



routes : {
'user/:id' : {
action : 'showUser',
before : 'beforeShowUser',
conditions : {
':id' : '([0-9]+)'
}
}
}



I don't have the background in regular expressions and ST to read the code easily, so I resorted to experimenting with the route. But not getting anywhere.

'user/:id/*' did not process uri #user/123/edit so bad guess.

'user/:id/:edit' generated an error for the uri. and so on with the guessing.

A few more examples, or a some english sentences on the general idea would be awful helpful. For those of us without gobs of ST experience and regular expression wizardry...

* * *

I also notice that browser back/forward does not set the url. I wonder if this is by design (reason being?) or just not done yet.

Cheers