[richfaces-issues] [JBoss JIRA] (RF-11776) rich:extendedDataTable columnsOrder attribute is not working

Kent Vogel (JIRA) jira-events at lists.jboss.org
Sun May 13 18:22:18 EDT 2012


    [ https://issues.jboss.org/browse/RF-11776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12692469#comment-12692469 ] 

Kent Vogel commented on RF-11776:
---------------------------------

This is the NPE that gets thrown:

{code}
17:32:43,938 SEVERE [org.richfaces.log.Context] (http--0.0.0.0-8080-4) null: java.lang.NullPointerException
        at javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:2410) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:2279) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at org.richfaces.renderkit.SortingFilteringRowsRenderer.updateAttribute(SortingFilteringRowsRenderer.java:140) [richfaces-components-ui-4.3.0-SNAPSHOT.jar:]
        at org.richfaces.renderkit.ExtendedDataTableRenderer.updateColumnsOrder(ExtendedDataTableRenderer.java:881) [richfaces-components-ui-4.3.0-SNAPSHOT.jar:]
        at org.richfaces.renderkit.ExtendedDataTableRenderer.doDecode(ExtendedDataTableRenderer.java:858) [richfaces-components-ui-4.3.0-SNAPSHOT.jar:]
...
{code}

It's manually thrown because columnsOrder isn't a defined attribute, and doesn't have a property descriptor.  

I added these 2 lines to AbstractExtendedDataTable.java in the components/iteration/ui project, and now it works:

{code}
    @Attribute
    public abstract String[] getColumnsOrder();
{code}

Someone with commit rights please take a look, looks like a simple fix.
                
> rich:extendedDataTable columnsOrder attribute is not working
> ------------------------------------------------------------
>
>                 Key: RF-11776
>                 URL: https://issues.jboss.org/browse/RF-11776
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tables
>    Affects Versions: 4.0.0.Final
>         Environment: Websphere AS 8, MyFaces
>            Reporter: Dmitry Volkov
>             Fix For: 4.3-Tracking
>
>
> I am not sure if columnsOrder attribute may be used or it is deprecated, but there is definitely an error in SortingFilteringRowsRenderer.updateAttribute method. 
> This line: 
> {code:java} 
> component.getAttributes().put(attribute, null);
> {code}
> always throws NullPointerException which is shallowed by try .. finally in UIDataAdaptor.visitTree method. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list