1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
    syedimty is on a distinguished road

      0  

    Default Unanswered: How to use global variable for store URL

    Unanswered: How to use global variable for store URL


    I want to use global variable for my store. I want to know where to declare global variable.
    My store is set to autoLoad true. I tried declaring variable in Ext.launch function , but the store is loaded even before the launch function

    my store
    Code:
    Ext.define("myapp.store.Bstore",{    extend:"Ext.data.Store",
        
        config:{
            
            model:"myapp.model.Bmodel",
             autoLoad:true,
            proxy:{
            type:'ajax',
            url: myapp.baseURL + '/bulletin/',
            reader:{
            type:'json',
            }
            }, }});

    My launch function
    Code:
       launch: function() {
    *****
    		 myapp.baseURL = 'http://10.5.82.27:9191/';
    
    
    		
     ****    
        
        },

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,141
    Answers
    131
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
    syedimty is on a distinguished road

      0  

    Default


    The solution you gave worked. But when i build the app as package. I get error again.

    Error : Uncaught TypeError: Cannot read property 'base_url' of undefined

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Location
    Saudi Arabia
    Posts
    3
    Vote Rating
    0
    fabdulqader is on a distinguished road

      0  

    Default


    Quote Originally Posted by syedimty View Post
    The solution you gave worked. But when i build the app as package. I get error again.

    Error : Uncaught TypeError: Cannot read property 'base_url' of undefined
    try to use myapp.app.baseURL it will work

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar