Re: How often does tree2 rebuild itself

2006-01-23 Thread Adam

Alex Burton wrote:

You could set up the backing bean to be in the session scope so that
the TreeModelBase doesn't have to be created each time. You just have
to update the model then if there is a change to it.



Thanks.

Adam


cheers,
alex.

On 18/01/06, Adam [EMAIL PROTECTED] wrote:


Dear All,

I have some code which if you like I'll post here which basically
renders out any XML file via an underlying JDOM DOM object using tree2.

The problem is that every time I click on a tree element (i.e. a node)
it would appear that the entire visible tree is repocessed  thus if I
have a reasonably large XML document it has to go through lots of jdom
elements etc again  again  again.

Is the tree cached in some way such that only the children of the newly
expanded node need be processed rather than every visible node  their
children?

e.g. if I have a document which has say 10 children hung off the root,
every time I click on an element I see the same 10 root elements being
re-processed  then their children etc.

Adam










Re: How often does tree2 rebuild itself

2006-01-23 Thread Adam

Gal Kirpichnikov wrote:


Hello Adam,

Try Ajax functionality: http://smirnov.org.ru/en/ajax-jsf.html


If you have any idea or example how to refresh tree2 content or/and
presentation as a result of action in other JSP page (like rename file name
in explorer changes it's name in left window navigation tree) I'll be
thankful,



Thanks. wrt the refresh from another JSP page, I am looking at something 
similar where a pop up is given a small chunk of a large xml file 
(obtained via xpath) which it then posts back (along with the xpath 
path)  that then replaces the old content  then the XML (J)DOM 
object has been changed etc.


How to detect this change is something I have been thinking about.

Adam



Re: How often does tree2 rebuild itself

2006-01-23 Thread Laurent Laniau
Hello,you can use x:saveState id="yourTree" value="#{yourTree}" /   Adam [EMAIL PROTECTED] a écrit:  Gal Kirpichnikov wrote: Hello Adam,  Try Ajax functionality: http://smirnov.org.ru/en/ajax-jsf.html   If you have any idea or example how to refresh tree2 content or/and presentation as a result of action in other JSP page (like rename file name in explorer changes it's name in left window navigation tree) I'll be thankful,Thanks. wrt the refresh from another JSP page, I am looking at something similar where a pop up is given a small chunk of a large xml file (obtained via xpath) which it then posts back (along with the xpath path)  that then replaces the "old content"  then the 
 XML
 (J)DOM object has been changed etc.How to detect this change is something I have been thinking about.Adam
		 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez la version beta.

RE: How often does tree2 rebuild itself

2006-01-17 Thread Gal Kirpichnikov
Hello Adam,

Try Ajax functionality: http://smirnov.org.ru/en/ajax-jsf.html


If you have any idea or example how to refresh tree2 content or/and
presentation as a result of action in other JSP page (like rename file name
in explorer changes it's name in left window navigation tree) I'll be
thankful,

Best regards,
Gal



-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Adam
Sent: ג 17 ינואר 2006 16:07
To: users@myfaces.apache.org
Subject: How often does tree2 rebuild itself

Dear All,

I have some code which if you like I'll post here which basically 
renders out any XML file via an underlying JDOM DOM object using tree2.

The problem is that every time I click on a tree element (i.e. a node) 
it would appear that the entire visible tree is repocessed  thus if I 
have a reasonably large XML document it has to go through lots of jdom 
elements etc again  again  again.

Is the tree cached in some way such that only the children of the newly 
expanded node need be processed rather than every visible node  their 
children?

e.g. if I have a document which has say 10 children hung off the root, 
every time I click on an element I see the same 10 root elements being 
re-processed  then their children etc.

Adam


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


Re: How often does tree2 rebuild itself

2006-01-17 Thread Alex Burton
You could set up the backing bean to be in the session scope so that
the TreeModelBase doesn't have to be created each time. You just have
to update the model then if there is a change to it.

cheers,
alex.

On 18/01/06, Adam [EMAIL PROTECTED] wrote:
 Dear All,

 I have some code which if you like I'll post here which basically
 renders out any XML file via an underlying JDOM DOM object using tree2.

 The problem is that every time I click on a tree element (i.e. a node)
 it would appear that the entire visible tree is repocessed  thus if I
 have a reasonably large XML document it has to go through lots of jdom
 elements etc again  again  again.

 Is the tree cached in some way such that only the children of the newly
 expanded node need be processed rather than every visible node  their
 children?

 e.g. if I have a document which has say 10 children hung off the root,
 every time I click on an element I see the same 10 root elements being
 re-processed  then their children etc.

 Adam