Results 1 to 2 of 2

Thread: Timing Problem

  1. #1
    Sencha User
    Join Date
    Feb 2014
    Posts
    11
    Vote Rating
    0
      0  

    Default 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
    10,376
    Answers
    430
    Vote Rating
    263
      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?

Tags for this Thread

Posting Permissions

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