You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andreas Schenk <dr...@gmx.net> on 2005/08/14 00:48:43 UTC

tree2 broken?

Hi,

it seems to me that the state saving mechanism of tree2 is broken:

As I wrote earlier today in another thread, tree2 with client side toggling 
does collapse completely when a leaf is clicked, if URL rewriting is used to 
track sessions. 

Thus I switched to cookies and ran into another problem: When I change the 
tree structure the application dumps. However, when I delete all cookies on 
the client side and try again, all works well. It is not straight forward to 
reproduce this behaviour as it depends on how the tree structure changes. 
Some changes do not cause the app to dump, others do.

Note that I didn't change the tree structure dynamically in the web app; I 
just changed it in the code and redeployed the application. I would guess -- 
but I don't know -- that the problem is worse if the tree structure is 
changed dynamically by the web app itself.

What will happen, if more than one tree is present in one web app, or even in 
one page? What, if framesets are used in addition? 

Regards

Andreas Schenk




Re: Antwort: Re: tree2 broken?

Posted by Jeff Cooper <js...@gmail.com>.
I'm getting the duplicate id problem also. I'm using the latest (sept. 8th) 
nightly build and that didn't fix the problem. Bala, did you get past your 
duplicate id problem?
 Thanks for any help,
Jeff Cooper

 On 8/22/05, Balaji Saranathan <ba...@wipro.com> wrote: 
> 
> 
> Ah,
> 
> Your explanation gives me the solution for the BitMask.
> Thanks
> Bala
> 
> -----Original Message-----
> From: Sean Schofield [mailto:sean.schofield@gmail.com]
> Sent: Saturday, August 20, 2005 1:58 PM
> To: MyFaces Discussion
> Subject: Re: Antwort: Re: tree2 broken?
> 
> 
> The invalid bitmask comment comes from HtmlTreeRenderer. This basically
> means that the renderer encountered an unexpected condition. In the
> case of a bitmask of 6, this means the renderer thinks that the node is
> expanded but yet it has no children. Only nodes with children should be
> expanded.
> 
> Most likely you are providing your own TreeNode class and it is
> providing the wrong answer to the isLeaf() method. Either that, or you
> are supplying the wrong data to TreeNodeBase.
> 
> HTH,
> 
> sean
> 
> On 8/20/05, Andreas Schenk <dr...@gmx.net> wrote:
> > Am Donnerstag, 18. August 2005 18:09 schrieb
> > mathias.werlitz@daimlerchrysler.com:
> > > What do you mean with the application dumps?
> > >
> > > This issue might be fixed with MYFACES-404 and MYFACES-423.
> >
> > I didn't check MYFACES-404 or MYFACES-423. I mean that the application
> 
> > throws an exception. I can manage to get either of the following two:
> >
> > javax.servlet.ServletException: cannot add component with id '_id77'
> > and path : {Component-Path : [Class:
> > org.apache.myfaces.component.html.ext.HtmlGraphicImage,Id: _id77]} to
> > its parent component. This might be a problem due to duplicate ids.
> >
> > javax.faces.FacesException: Invalid bit mask of 6
> >
> > I have a simple page, containing the tree2 example with both,
> > server-side and client-side toggle. I open both trees, delete a node
> > from the TreeBacker, redeploy the application and reload the page with
> 
> > the browser.
> >
> > Regards,
> >
> > Andreas Schenk
> >
> >
> >
> 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message and any attachments 
> to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or 
> privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or 
> Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.
>

RE: Antwort: Re: tree2 broken?

Posted by Balaji Saranathan <ba...@wipro.com>.
Ah,

Your explanation gives me the solution for the BitMask. 
Thanks
Bala

-----Original Message-----
From: Sean Schofield [mailto:sean.schofield@gmail.com] 
Sent: Saturday, August 20, 2005 1:58 PM
To: MyFaces Discussion
Subject: Re: Antwort: Re: tree2 broken?


The invalid bitmask comment comes from HtmlTreeRenderer.  This basically
means that the renderer encountered an unexpected condition.  In the
case of a bitmask of 6, this means the renderer thinks that the node is
expanded but yet it has no children.  Only nodes with children should be
expanded.

Most likely you are providing your own TreeNode class and it is
providing the wrong answer to the isLeaf() method.  Either that, or you
are supplying the wrong data to TreeNodeBase.

HTH,

sean

On 8/20/05, Andreas Schenk <dr...@gmx.net> wrote:
> Am Donnerstag, 18. August 2005 18:09 schrieb
> mathias.werlitz@daimlerchrysler.com:
> > What do you mean with the application dumps?
> >
> > This issue might be fixed with MYFACES-404 and MYFACES-423.
> 
> I didn't check MYFACES-404 or MYFACES-423. I mean that the application

> throws an exception. I can manage to get either of the following two:
> 
> javax.servlet.ServletException: cannot add component with id '_id77' 
> and path : {Component-Path : [Class:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage,Id: _id77]} to 
> its parent component. This might be a problem due to duplicate ids.
> 
> javax.faces.FacesException: Invalid bit mask of 6
> 
> I have a simple page, containing the tree2 example with both, 
> server-side and client-side toggle. I open both trees, delete a node 
> from the TreeBacker, redeploy the application and reload the page with

> the browser.
> 
> Regards,
> 
> Andreas Schenk
> 
> 
>




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

Re: Antwort: Re: tree2 broken?

Posted by Sean Schofield <se...@gmail.com>.
The invalid bitmask comment comes from HtmlTreeRenderer.  This
basically means that the renderer encountered an unexpected condition.
 In the case of a bitmask of 6, this means the renderer thinks that
the node is expanded but yet it has no children.  Only nodes with
children should be expanded.

Most likely you are providing your own TreeNode class and it is
providing the wrong answer to the isLeaf() method.  Either that, or
you are supplying the wrong data to TreeNodeBase.

HTH,

sean

On 8/20/05, Andreas Schenk <dr...@gmx.net> wrote:
> Am Donnerstag, 18. August 2005 18:09 schrieb
> mathias.werlitz@daimlerchrysler.com:
> > What do you mean with the application dumps?
> >
> > This issue might be fixed with MYFACES-404 and MYFACES-423.
> 
> I didn't check MYFACES-404 or MYFACES-423. I mean that the application throws
> an exception. I can manage to get either of the following two:
> 
> javax.servlet.ServletException: cannot add component with id '_id77' and
> path : {Component-Path : [Class:
> org.apache.myfaces.component.html.ext.HtmlGraphicImage,Id: _id77]} to its
> parent component. This might be a problem due to duplicate ids.
> 
> javax.faces.FacesException: Invalid bit mask of 6
> 
> I have a simple page, containing the tree2 example with both, server-side and
> client-side toggle. I open both trees, delete a node from the TreeBacker,
> redeploy the application and reload the page with the browser.
> 
> Regards,
> 
> Andreas Schenk
> 
> 
>

Re: Antwort: Re: tree2 broken?

Posted by Andreas Schenk <dr...@gmx.net>.
Am Donnerstag, 18. August 2005 18:09 schrieb 
mathias.werlitz@daimlerchrysler.com:
> What do you mean with the application dumps?
>
> This issue might be fixed with MYFACES-404 and MYFACES-423.

I didn't check MYFACES-404 or MYFACES-423. I mean that the application throws 
an exception. I can manage to get either of the following two:

javax.servlet.ServletException: cannot add component with id '_id77' and 
path : {Component-Path : [Class: 
org.apache.myfaces.component.html.ext.HtmlGraphicImage,Id: _id77]} to its 
parent component. This might be a problem due to duplicate ids.

javax.faces.FacesException: Invalid bit mask of 6

I have a simple page, containing the tree2 example with both, server-side and 
client-side toggle. I open both trees, delete a node from the TreeBacker, 
redeploy the application and reload the page with the browser.

Regards,

Andreas Schenk



Antwort: Re: tree2 broken?

Posted by ma...@daimlerchrysler.com.
What do you mean with the application dumps?

This issue might be fixed with MYFACES-404 and MYFACES-423.

Re: tree2 broken?

Posted by Sean Schofield <se...@gmail.com>.
Open a JIRA issue on this one.  I believe there are a few problems
with the new TreeState interface.  I will look into it later this
week.

sean

On 8/13/05, Andreas Schenk <dr...@gmx.net> wrote:
> Hi,
> 
> it seems to me that the state saving mechanism of tree2 is broken:
> 
> As I wrote earlier today in another thread, tree2 with client side toggling
> does collapse completely when a leaf is clicked, if URL rewriting is used to
> track sessions.
> 
> Thus I switched to cookies and ran into another problem: When I change the
> tree structure the application dumps. However, when I delete all cookies on
> the client side and try again, all works well. It is not straight forward to
> reproduce this behaviour as it depends on how the tree structure changes.
> Some changes do not cause the app to dump, others do.
> 
> Note that I didn't change the tree structure dynamically in the web app; I
> just changed it in the code and redeployed the application. I would guess --
> but I don't know -- that the problem is worse if the tree structure is
> changed dynamically by the web app itself.
> 
> What will happen, if more than one tree is present in one web app, or even in
> one page? What, if framesets are used in addition?
> 
> Regards
> 
> Andreas Schenk
> 
> 
> 
>