WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Refresh xTree Version 1.17, Samuel, December 16, 2003
     Re:Refresh xTree Version 1.17, Samuel, December 18, 2003
         Re:Refresh xTree Version 1.17, Samuel, December 18, 2003

Subject: Re:Refresh xTree Version 1.17 From: Samuel Date: December 18, 2003

As I didn't receive any answer, I developped my own refresh function. So for the prosperity, here is the code to add if you want to dynamically change the text displayed by a node :

WebFXTreeAbstractNode.prototype.refresh = function() {
  alert('On est dans refresh()');
//On formate le texte pour pouvoir l'afficher correctement
  var nouveauTexte = this.text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
//On change le texte qui se trouve dans la balise <a id=this.id + "-anchor"/>
  document.getElementById(this.id + '-anchor').firstChild.nodeValue = nouveauTexte; 
}

Usage :

node.text = newText;

node.refresh();

From: Samuel
Sent: December 16, 2003
Subject: Re:Refresh xTree Version 1.17

Is it possible to refresh a single node or the entire tree ?

The "text" property of a node changes dynamically and I want it to be refreshed. (i tried to collapse/expend the parent but the text of the the node is not refreshed)

Any idea on how to do that ?

Thanx a lot !





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX