Results 1 to 4 of 4

Thread: redirectTo not working

    Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    55
    Vote Rating
    0
      0  

    Default redirectTo not working

    I have a function in my Ext.application call:

    Code:
       
    requireUser: function() {
            if(this.isAuthenticated()) return true;
            this.redirectTo('login');
            return false;
        },
    I have a route set up in my sessions controller (included in the application controllers option)

    Code:
    Ext.define('WT.controller.Sessions', {
      extend: 'Ext.app.Controller',
      config: {
        routes: {
          'login': 'showLogin'
        },
    but the showLogin function is never getting called. If I navigate to #login directly it works. It appears that after this line in the SenchaTouch dispatch function:
    Code:
    action = Ext.factory(action, Ext.app.Action);
    
    action.getController() returns null (the original action object had a controller property though).

    I'm probably doing something wrong, but wanted to report this.

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    11
      0  

    Default

    Hmm can you zip your application up (just the app files, not Sencha Touch) and upload it here? It's hard to diagnose from this (plus our own examples work correctly).

    You should also try the freshly-released beta 2 (http://www.sencha.com/blog/dive-into...ouch-2-beta-2/)
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  4. #4
    Sencha User
    Join Date
    Jul 2009
    Posts
    55
    Vote Rating
    0
      0  

    Default

    This is working now that I've upgraded to Beta 2, thanks for looking into it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •