Results 1 to 5 of 5

Thread: how to refresh DataView?

  1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    8
    Vote Rating
    0
      0  

    Default 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
    Bédoin/Redwood City
    Posts
    30,636
    Vote Rating
    57
      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.
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  3. #3
    Ext User
    Join Date
    Jan 2008
    Posts
    8
    Vote Rating
    0
      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
      0  

    Default hey

    Hey tufi,

    Can you post how exactly you did that?

  5. #5
    Ext User
    Join Date
    Aug 2010
    Posts
    94
    Vote Rating
    0
      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?

Posting Permissions

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