Results 1 to 9 of 9

Thread: Extjs 'store' is not getting execute in my existing application..

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default Extjs 'store' is not getting execute in my existing application..

    I've a hierarchy of my application as shown in the attached pic..
    My problem is:
    Why the hell my "store's data(saved in users.json)" is not executing!! on the other hand if I supply my data in view.List than its working fine...
    I've read the whole MVC Application Architecture thoroughly at http://docs.sencha.com/ext-js/4-0/#!...n_architecture but when I define my store in an other folder(other than view.List) than its getting stuck and not executing...
    Actually i've to GET data from local host and then apply some extjs grid functionality on it!! Currently my application is also gets executed from local host domain...
    Can anyone plz help me about my this problem..
    Some preview of my starting code is below:

    app.js
    (in the main folder and index.html is also in the same folder)
    Code:
    Ext.application({
    	requires : ['Ext.container.Viewport'],
    
    
        controllers: ['Users'],
    	
    	name: 'SI',
    	appFolder: 'media/app',
    Users.js(in a folder named 'controller')
    Code:
    Ext.define('SI.controller.Users', {
        extend: 'Ext.app.Controller',
        views: ['user.List', 'user.Edit'],
    List.js(in Folder: view -> user)
    Code:
    Ext.define('SI.view.user.List' ,{
        extend: 'Ext.grid.Panel',
        alias : 'widget.stu',
    Edit.js(in Folder: view -> user)
    Code:
    Ext.define('SI.view.user.Edit', {
    	requires : ['Ext.window.Window'],
        extend: 'Ext.window.Window',
    Viewport.js(in Folder: view)
    Code:
    Ext.define('SI.view.Viewport', {
        extend: 'Ext.container.Viewport'
    });
    Users.js(in Folder: store)
    Code:
    Ext.define('SI.store.Users', {
        extend: 'Ext.data.Store',
    User.js(in Folder: model)
    Code:
    Ext.define('SI.model.User', {
        extend: 'Ext.data.Model'
    });
    updateUser.json(in Folder: data)
    Code:
    {"success": true}
    users.json(in Folder: data)
    Code:
    {
        success: true,
        users: [
               {stuId: '123451',    stuName: 'ABCD1'},
               {stuId: '123452',    stuName: 'ABCD2'}
        ]
    }
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Jun 2009
    Posts
    52
    Vote Rating
    0
      0  

    Default

    You have to load your store in your controller.
    Code:
    stores: ['Users']

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default

    yes i've loded the store in controller also (as i haven't show the complete code)..

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    7
    Vote Rating
    0
      0  

    Default

    had u try the "autoload: true" on Store?

    my problem is how to sync() it!!

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default

    yes have done that also..

  6. #6
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default

    solved..

  7. #7
    Sencha User
    Join Date
    Jan 2012
    Posts
    7
    Vote Rating
    0
      0  

    Default

    how?

  8. #8
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default

    i dnt define fields:[] in store..

  9. #9
    Sencha User Tim Toady's Avatar
    Join Date
    Feb 2010
    Location
    Pennsylvania
    Posts
    603
    Vote Rating
    284
      0  

    Default

    hmak: Fields in the store was the pre-MVC way of doing things. Put your fields in your model and your model in your store.

Posting Permissions

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