On Mon, Apr 27, 2009 at 1:22 PM, Mustafa Sak <[email protected]> wrote:
>
> Hi,
>
> i am trying to change the icon of an branch, but i think there is a bug,
> because after changing i can't see any effort. But if i open or close
> another branch the change takes effect.
>
> The second problem is, that i want to set Column Data, but i get an error
> instead.
>
> My code:
>
> disableCat.addListener("execute", function(e)
> {
>
> //////console.log(SelectTradeList.getDataModel().getRowData(SelectTradeList.getFocusedRow()));
>
> var node=dataModel.getNodeFromRow(tree.getFocusedRow());
> console.log(node);
> var catid=dataModel.getColumnData(node.nodeId,0);
> var status=dataModel.getColumnData(node.nodeId,1);
>
> var diabledIcon='resource/toppreis/folder_h.png';
> var enabledIcon='resource/toppreis/folder.png';
>
> if (status==1)
> {
> tree.nodeSetIcon(node, diabledIcon);
> tree.nodeSetSelectedIcon(node, diabledIcon);
> tree.nodeSetLabelStyle(node, "color: red;");
> console.log(diabledIcon);
> dataModel.setColumnData(node, 1, "0");
>
> }
> else
> {
> status=true;
> tree.nodeSetLabelStyle(node, "color: green;");
> tree.nodeSetIcon(node, enabledIcon);
> tree.nodeSetSelectedIcon(node, enabledIcon);
> console.log(enabledIcon);
> dataModel.setColumnData(node, 1, "1");
>
> }
> }, this);
>
You need to call dataModel.setData() with no parameters after making a set
of changes to the data. This is in order to prevent the tree from being
updated with each of a large number of changes, but rather to update it all
at once after the large number of changes have been applied.
Derrell
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel