-
Ext User
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
-
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.
-
Ext User
it worked. thanx for the rapid help...
-
Ext User
hey
Hey tufi,
Can you post how exactly you did that?
-
Ext User
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
-
Forum Rules