WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 A problem about reloading WebFXLoadTreeItems., Beyonder Feng, July 14, 2004
     Re:A problem about reloading WebFXLoadTreeItems., Erik Arvidsson, July 19, 2004

Subject: A problem about reloading WebFXLoadTreeItems. From: Beyonder Feng Date: July 14, 2004

Hi.

     In my project the items in the tree can be deleted or added ,that means the tree items can be  modefied . To reach this , I use the reload() method. But I don't get the newly changed items. Even I refresh the page, I cann't get the expected result. However , if  I open it in a new window, I get the expected result. It seems that the xml codes are saved in the sesssion.

     I have done an experiment.   I declare a WebFXLoadTreeItem like so: var rti = new WebFXLoadTreeItem("Tree Item 2", "testTree.xml"); . After open the window, the tree contains the items in the testTree.xml. Then I modefied the testTree.xml manually and refresh the page , the tree still contains the old items. Even I call the reload() method , I cann't get the newly changed items.

     My enviroment is : Windows2000 Advanced Server + Tomcat 4.1.18 . My browser is MS IE6.0 .

      The following is the jsp code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>XLoadTree Demo (WebFX)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="JavaScript" src="xtree.js"></script>
<script language="JavaScript" src="xmlextras.js"></script>
<script language="JavaScript" src="xloadtree.js"></script>
<link type="text/css" rel="stylesheet" href="xtree.css" />
<body>
<p><button onclick="rti.reload()">Reload Item</button></p>
<script language="JavaScript" >
var rti = new WebFXLoadTreeItem("Tree Item 2", "testTree.xml");
var tree = new WebFXTree("Root");
tree.add(new WebFXTreeItem("Tree Item 1"));
tree.add(rti);
tree.add(new WebFXTreeItem("Tree Item 4"));

document.write(tree);
</script>
</body>

 The following is the code of testTree.xml:

<?xml version="1.0"?>

<tree>
  <tree text="Node_1.3" action="javascript:alert(this.text)"/>
  <tree text="Node_2.3" action="javascript:alert(this.text)"/>
  <tree text="Node_3.3" action="javascript:alert(this.text)"/>
</tree>

 

Thanks.

 




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