[richfaces-issues] [JBoss JIRA] (RF-13235) Tree - Row key conversion fails (UITree should not have generated @rowKeyConverter, since it is fully implemented in AbstractTree)

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Thu Oct 3 13:43:02 EDT 2013


     [ https://issues.jboss.org/browse/RF-13235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukáš Fryč resolved RF-13235.
-----------------------------

    Resolution: Done

    
> Tree - Row key conversion fails (UITree should not have generated @rowKeyConverter, since it is fully implemented in AbstractTree)
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-13235
>                 URL: https://issues.jboss.org/browse/RF-13235
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tree
>    Affects Versions: 5.0.0.Alpha2
>            Reporter: Lukáš Fryč
>            Assignee: Lukáš Fryč
>            Priority: Critical
>             Fix For: 5.0.0.Alpha2
>
>
> The row key generation for Tree stopped to work:
> *got:* <div id="j_idt106:tree:org.richfaces.model.SequenceRowKey[0, 0, 0]:j_idt111" class="rf-tr-nd rf-tr-nd-lf">
> *expected:* <div id="j_idt106:tree:0.0.0:j_idt111" class="rf-tr-nd rf-tr-nd-lf">
> ----
> The cause was that rowKeyConverter resolves to null, so plain toString on rowKey is used.
> I was wondering why rowKeyConverter isn't resolved for Tree in Showcase - the problem is that CDK generates this attribute and thus its implementation in AbstractTree (which is the correct way of rowKeyResolution) isn't used at all.
> I'm pretty sure this is caused by refactoring from tree-model-props.xml to use Java interfaces TreeProps and TreeCommonProps:
> https://github.com/richfaces/richfaces/commit/62ab0fe3f00b44a166b522ecb71e1733897aeebe
> However it's not clear why the rowKeyConverter wasn't generated in RF 4.3  when it wasn't marked as generate=false:
> https://github.com/richfaces4/components/blob/master/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-model-props.xml#L48
> Note that in RF 5 it is generated because UIAdaptor has @Attribute which defaults to generate=true:
> https://github.com/richfaces/richfaces/blob/master/framework/src/main/java/org/richfaces/ui/iteration/UIDataAdaptor.java#L612
> Workaround is marking rowKeyConverter as generate=false in AbstracTree (or maybe RowKeyConverter), but we should rather investigate why this issue happens.
> ----
> This issue has bigger potential since during refactoring of properties, [~bleathem] could work with the same assumption as I did ^.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list