Right we have a JIRA issue on that one I believe. Thats not the particular problem being discussed here though. Mihir's problem is that he is not seeing his new data. I believe in your test scenario you were randomly changing your data between requests. While that might simulate a real world scenario, its much more likely that your data will not change between requests. So I think its a bit of an overstatement to say "I can't see that it works at all ..."
Your problem is a bit complicated and you would have the same problem in h:dataTable as well by the way. I think we talked about issuing a warning in your case right? There are other possibilities to consider as well such as a preserveDataModel attribute when you *don't* want to change the data between posts. sean On 4/19/05, Rob Decker <[EMAIL PROTECTED]> wrote: > I get a fatal exception when the data changes and the user clicks a node > that no longer exists so the tree never gets a chance to render the new tree > node. Given that, I can't see that it works at all in a dynamic environment. > > ----- Original Message ----- > From: "Sean Schofield" <[EMAIL PROTECTED]> > To: "MyFaces Discussion" <[email protected]> > Sent: Monday, April 18, 2005 11:14 PM > Subject: Re: Refreshing the view/component/page > > I would agree that there are some outstanding issues in JIRA to be > resolved but I would strenuously disagree that tree2 doesn't work very > well in a dynamic environment. > > Mihir, I take it you are posting your results after you change your > list box right? (Otherwise how could the data possibly change?) > > Tree2 will show whatever data is set through whatever bean you have > bound to the value attribute. This bean is a TreeNode (your root > node) that contains the other nodes. We're looking at making tree2 > more flexible so that you can specify a model but that is really not > relevant to the problem IMO. > > The tree renders whatever data is associated with the value binding > expression at the time or the RenderResponse phase. If its not > showing the right data, that is most likely your fault and not the > fault of tree2. I'm assuming that you are using server-side toggle > b/c you say the data changes when you open the root node. Most likely > you have an action listener or something that is causing your backing > bean (probably session scope) to update itself and then you get the > correct data. > > Does this sound familar or do I have this wrong? Tree2 can handle > dynamic data no problem but it needs to know about the changes in the > data. If you are using session scope try changing to request scope so > the bean is reconstructed with the latest data during the > RenderResponse phase. This is guaranteed by the JSF lifecylce. > > HTH, > sean > > On 4/18/05, Jon Travis <[EMAIL PROTECTED]> wrote: > > Mihir, > > > > We are having similar problems with our tree usage > > here. Unfortunately tree2 doesn't work very well > > in a dynamic environment, when the contents & labels > > of the tree are changing. I think there are some > > open JIRAs about it. > > > > Would be nice to have this working. > > > > -- Jon > > > > > > On Apr 12, 2005, at 5:38 AM, Mihir Solanki wrote: > > > > > It is showing the closed tree with root node having old value only. > > > > > > > > > > > > When I click on the root node the tree gets expanded and then I am > > > getting the new data. > > > > > > > > > > > > Mihir > > > > > > > > > > > > -----Original Message----- > > > From: Rob Decker [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, April 12, 2005 6:05 PM > > > To: MyFaces Discussion; [EMAIL PROTECTED] > > > Subject: Re: Refreshing the view/component/page > > > > > > > > > > > > When you say it's not showing the updated data do you mean it's > > > showing a new, closed tree (the root node of the new tree, not > > > expanded) or that you see the old tree data still on the page but when > > > you click it suddenly refreshes? > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: Mihir Solanki > > > > > > To: 'MyFaces Discussion' > > > > > > Sent: Tuesday, April 12, 2005 8:28 AM > > > > > > Subject: FW: Refreshing the view/component/page > > > > > > > > > > > > Hi, > > > > > > > > > > > > I have two components in my JSF page > > > > > > > > > > > > 1. select one list box > > > > > > 2. tree2 > > > > > > > > > > > > Now based on the selection changes in the select box I want to updated > > > the whole tree (basically selected item should come as a root node of > > > the tree whenever selection change event occurs in the select one list > > > box). > > > > > > > > > > > > I have two backing beans implemented for select one box and tree2. I > > > am also getting selection change event and so I am updating the tree > > > data in that event. > > > > > > > > > > > > The problem is when I change the selection in the list box, my tree is > > > not showing the updated data, but when I click on the root node of the > > > tree it is showing me the updated data then further. > > > > > > > > > > > > So my question is, is there any way so I can update the > > > view/Page/component from backing bean so I can always be rest assure > > > that whatever I have set I will get in UI. > > > > > > > > > > > > Thanks > > > > > > Mihir Solanki > > > > > > > > > > > > > > > > > > > > > > > > > > > Patni Computer Systems Ltd. > > > > > > Tel : 91 79 23240905Ext : 413 > > > > > > > > > > > > > > > http://www.patni.com > > > World-Wide Partnerships. World-Class Solutions. > > > _____________________________________________________________________ > > > > > > This e-mail message may contain proprietary, confidential or legally > > > privileged information for the sole use of the person or entity to > > > whom this message was originally addressed. Any review, e-transmission > > > dissemination or other use of or taking of any action in reliance upon > > > this information by persons or entities other than the intended > > > recipient is prohibited. If you have received this e-mail in error > > > kindly delete this e-mail from your records. If it appears that this > > > mail has been forwarded to you without proper authority, please notify > > > us immediately at [EMAIL PROTECTED] and delete this mail. > > > _____________________________________________________________________ > > > > > > > > > http://www.patni.com > > > World-Wide Partnerships. World-Class Solutions. > > > _____________________________________________________________________ > > > > > > This e-mail message may contain proprietary, confidential or legally > > > privileged information for the sole use of the person or entity to > > > whom this message was originally addressed. Any review, e-transmission > > > dissemination or other use of or taking of any action in reliance upon > > > this information by persons or entities other than the intended > > > recipient is prohibited. If you have received this e-mail in error > > > kindly delete this e-mail from your records. If it appears that this > > > mail has been forwarded to you without proper authority, please notify > > > us immediately at [EMAIL PROTECTED] and delete this mail. > > > _____________________________________________________________________ > > > > > > http://www.patni.com > > > World-Wide Partnerships. World-Class Solutions. > > > _____________________________________________________________________ > > > > > > This e-mail message may contain proprietary, confidential or legally > > > privileged information for the sole use of the person or entity to > > > whom this message was originally addressed. Any review, e-transmission > > > dissemination or other use of or taking of any action in reliance upon > > > this information by persons or entities other than the intended > > > recipient is prohibited. If you have received this e-mail in error > > > kindly delete this e-mail from your records. If it appears that this > > > mail has been forwarded to you without proper authority, please notify > > > us immediately at [EMAIL PROTECTED] and delete this mail. > > > _____________________________________________________________________ > > > > > >

