1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    8
    Vote Rating
    0
    tufi is on a distinguished road

      0  

    Default how to refresh DataView?

    how to refresh DataView?


    hi,

    i try to customize the "organize images" example. i want the DataView to refresh and show the images of the node i clicked in the tree on the left side. But i can't get it work..
    it must be something very simple, but as a beginner in Ext i can't find any solution. hope someone can help me..

    thanx...

    tufi

    here is my modified organizer.js:

    [PHP]
    Ext.onReady(function(){

    Ext.QuickTips.init();
    // Album toolbar
    var newIndex = 3;

    var tb = new Ext.Toolbar({
    items:[{
    text: 'New Album',
    iconCls: 'album-btn',
    handler: function(){
    var node = root.appendChild(new Ext.tree.TreeNode({
    text:'Album ' + (++newIndex),
    cls:'album-node',
    allowDrag:false
    }));
    tree.getSelectionModel().select(node);
    setTimeout(function(){
    ge.editNode = node;
    ge.startEdit(node.ui.textNode);
    }, 10);
    }
    }]
    });

    var Tree = Ext.tree;
    // set up the Album tree
    var tree = new Ext.tree.TreePanel({
    loader: new Ext.tree.TreeLoader(
    {
    dataUrl:'http://localhost:8080/test_project/getNodes',
    baseParams: {
    whichTree:'extracted',
    onlyDirs: 'false',
    onlyFiles: 'false'
    }
    }
    ),
    animate:true,
    enableDD:true,
    containerScroll: true,
    ddGroup: 'organizerDD',
    rootVisible:false,
    // layout
    region:'west',
    width:200,
    split:true,
    // panel
    title:'My Albums',
    autoScroll:true,
    tbar: tb,
    margins: '5 0 5 5'
    });

    var root = new Ext.tree.AsyncTreeNode({
    text: 'Albums',
    id:'root',
    allowDrag:false,
    allowDrop:false
    });

    tree.setRootNode(root);

    // add an inline editor for the nodes
    var ge = new Ext.tree.TreeEditor(tree, {
    allowBlank:false,
    blankText:'Sie m

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    57
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    GridPanels, and DataViews a backed by a Store. The store is the Model, the GridPanel/DataView is the View.

    Reload the Store, and the View finds out about that and refreshes itself.

  3. #3
    Ext User
    Join Date
    Jan 2008
    Posts
    8
    Vote Rating
    0
    tufi is on a distinguished road

      0  

    Default


    it worked. thanx for the rapid help...

  4. #4
    Ext User
    Join Date
    Nov 2007
    Location
    Mountain View
    Posts
    5
    Vote Rating
    0
    kazeon is on a distinguished road

      0  

    Default hey

    hey


    Hey tufi,

    Can you post how exactly you did that?

  5. #5
    Ext User
    Join Date
    Aug 2010
    Posts
    94
    Vote Rating
    0
    andredecotia is on a distinguished road

      0  

    Default


    Hey all,
    if I have .js included in another page file? Could I call store.load() by calling from another page that has .js file?