[ http://issues.apache.org/jira/browse/TAPESTRY-1065?page=all ]
Jesse Kuhnert updated TAPESTRY-1065:
------------------------------------
Fix Version/s: 4.1.2
> TreeDataView.renderComponent() and TreeTableDataView.generateNodeList()
> cause ClassCastException in ITreeDataModel.getUniqueKey()
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1065
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1065
> Project: Tapestry
> Issue Type: Bug
> Components: Contrib
> Affects Versions: 4.0.2
> Environment: Tapestry 4.0.2
> Java 1.5
> Windows XP
> Reporter: Ryan Holmes
> Fix For: 4.1.2
>
>
> TreeDataView.renderComponent() calls ITreeDataModel.getUniqueKey() with a
> root node object when it should be passing in a rootUID object (line 86 in
> TreeDataView.java):
> Object objChildUID = objTreeModel.getTreeDataModel()
> .getUniqueKey(objChild, objRoot);
> Instead of objRoot, objRootUID should be used, which has already been fetched
> on line 62:
> Object objRoot = objTreeDataModel.getRoot();
> Object objRootUID = objTreeDataModel.getUniqueKey(objRoot, null);
> This causes a ClassCastException on line 80 of
> SimpleTreeDataModel.getUniqueKey():
> TreePath objPath = (TreePath)objParentUniqueKey;
> SimpleTreeDataModel implements ITreeDataModel correctly (which specifies that
> a parent UID is to be passed into getUniqueKey() rather than a parent node),
> and other callers to ITreeDataModel.getUniqueKey() pass in a parent UID, so I
> believe this is a straightforward bug in TreeDataView and TreeTableDataView.
> The same bug exists in TreeTableDataView.generateNodeList() on line 117:
> Object objChildUID =
> objTreeModel.getTreeDataModel().getUniqueKey(
> objChild,
> objRoot);
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]