[
https://issues.apache.org/jira/browse/TAPESTRY-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesse Kuhnert resolved TAPESTRY-1065.
-------------------------------------
Resolution: Fixed
Assignee: Jesse Kuhnert
Looks like it's already been resolved to me.
> TreeDataView.renderComponent() and TreeTableDataView.generateNodeList()
> cause ClassCastException in ITreeDataModel.getUniqueKey()
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1065
> URL: https://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
> Assigned To: Jesse Kuhnert
> 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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]