FYI: I have an example that will do this (i.e., disable navigation icons
and use the action listener to handle the events); I'm just having
issues with RSA and Subversion.

- Brendan

-----Original Message-----
From: sean schofield (JIRA) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 07, 2005 10:37 AM
To: dev@myfaces.apache.org
Subject: [jira] Created: (MYFACES-531) Tree2 examples can result in
"Invalid bitmask error"


Tree2 examples can result in "Invalid bitmask error"
----------------------------------------------------

         Key: MYFACES-531
         URL: http://issues.apache.org/jira/browse/MYFACES-531
     Project: MyFaces
        Type: Bug
    Versions: Nightly Build    
    Reporter: sean schofield
 Assigned to: sean schofield 
     Fix For: Nightly Build


If you click on the folder (as opposed to the +/- nav icon) of a node
that has server side toggle, you will get an Invalid Bitmask exception.
This is because the folders have commandLinks associated with them and
they are toggling the state of the node regardless of whether the node
is a leaf or not.  Even though the TreeBacker adds the empty nodes as
branches, the isLeaf method of TreeNodeBase is returning true b/c the
child count is zero.  (That's a new twist to prevent the +/- icons from
showing up on empty nodes.)

Solution is to remove the commandLinks from the folder nodes and only
allow expansion of the folders by the nav icons.  Its possible to use
<h:commandLink> in your folder facets by writing an actionListener that
would check the leaf status before toggling the expanded state but that
is an exercise left to the user.

I will also add a simple example that does allow <h:commandLink> (and
disabled navigation icons).  This example will conditionally render the
command link based on the leaf status.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to