Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.1.4-SNAPSHOT
-
None
-
None
-
WindowsXP, SUN JSF RI 1.1.02, Tomahawk 1.1.5
Description
When a button that executes HtmlTree.expandAll is put into the same <h:form> then the Tree2 component after clicking on the button Tree2 throws NumberFormat or NullPointer exception (depending on which build of Tomahawk is used).
On our system I have fixed it with teh following code:
package org.apache.myfaces.custom.tree2
class UITreeData
public void broadcast(FacesEvent event) throws AbortProcessingException
{
if (event instanceof FacesEventWrapper)
else if(event instanceof ToggleExpandedEvent)
{
ToggleExpandedEvent toggleEvent = (ToggleExpandedEvent) event;
if (toggleEvent.getNodeId() != null && !"null".equals(toggleEvent.getNodeId()))
{ String currentNodeId = getNodeId(); setNodeId(toggleEvent.getNodeId()); toggleExpanded(); setNodeId(currentNodeId); }
}
else
}
The chanegd code first check if the node to be toggledis valid before it performs the toggle.