[richfaces-issues] [JBoss JIRA] Resolved: (RF-4931) Tree Adaptors: ClassCastException in StackingTreeModel
Ilya Shaikovsky (JIRA)
jira-events at lists.jboss.org
Fri Jul 10 18:41:35 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-4931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilya Shaikovsky resolved RF-4931.
---------------------------------
Resolution: Rejected
Assignee: Tsikhon Kuprevich (was: Nick Belaevski)
3.1.x branch no more under active development,
> Tree Adaptors: ClassCastException in StackingTreeModel
> ------------------------------------------------------
>
> Key: RF-4931
> URL: https://jira.jboss.org/jira/browse/RF-4931
> Project: RichFaces
> Issue Type: Patch
> Affects Versions: 3.1.x
> Reporter: Nick Belaevski
> Assignee: Tsikhon Kuprevich
> Fix For: 3.1.x
>
>
> ClassCastException in StackingTreeModel.java:137
> Method doSetupKey throws classCastException for one of the scenario.
>
> Steps:-
> Search items so that we get Tree(richfaces) list on page.
> Delete the one of the node from tree (ajax delete)
> After that we tried to reset the search parameters (They are in different a4j:region than the tree) by clicking on Reset button
> which means we had to rerender tree for reset operation.
> While rerendering the tree we got class cast exception. at line 137.
>
> Following is the code we fixed in our project.
>
> protected StackingTreeModel doSetupKey(Iterator<Key> keyIterator, Iterator<StackEntry> entriesIterator, FacesContext context, Object modelKey) {
> if (modelKey != null) {
> if (!setupModel(modelKey, context)) {
> //no key is available
> leaveModel(getRoot().stackEntries.iterator(), null, context);
> return null;
> }
>
> //TODO what's here?
> }
>
> if (keyIterator != null && keyIterator.hasNext()) {
> //Patch added by Atul
> Object obj = keyIterator.next();
> if(obj == null || !(obj instanceof Key)) {
> leaveModel(entriesIterator, null, context);
> return this;
> }
> Key key = (Key)obj;
> //Patch ends by Atul
> //Following is orginal code commented by Atul for above patch.
> //Key key = keyIterator.next();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list