1. #1
    Sencha User
    Join Date
    Feb 2014
    Posts
    11
    Vote Rating
    0
    Cake4k is on a distinguished road

      0  

    Default Unanswered: Timing Problem

    Unanswered: Timing Problem


    Hello,

    i got a huge problem:

    We have an Application which was running perfectly in dev Mode. Today we tried to build the application and we recognized that there were "Requires" missing (errors while or after compiling). Adding the "Requires" brings a new problem which is about timings.

    There is an extj class "enviroment (singleton)" which holds data and has multiple functions. One function get started by an controller which makes an ajax call (data gets set). The second function check for "permissions/roles".
    Now while everything gets required, multiple stores, views ask the enviroment class for permission. Because the data is not set there are multiple errors.

    Example:
    Ext.define('sharesuite.store.dms.ExplorerTreeStore', {
    ...
    root : {
    expanded : true,
    name : "Root-Ebene",
    allowDrop : Enviroment.hasRole('ADMIN')
    },
    ...
    });

    What are the options to fix this?

    sincerly
    cake

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,570
    Answers
    146
    Vote Rating
    66
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    Difficult to say without more information. In general, you obviously want to get that data loaded before trying to use it. Can you use events to control that or perhaps check for admin privileges before the store loads?
    Get on the Fast Track with Sencha Training http://sencha.com/training

    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

Thread Participants: 1

Tags for this Thread