[richfaces-issues] [JBoss JIRA] (RF-12327) NPE in calendar if enableManualInput=true

Brian Leathem (JIRA) jira-events at lists.jboss.org
Mon Aug 27 17:38:16 EDT 2012


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

Brian Leathem updated RF-12327:
-------------------------------

    Sprint: CDK issues 2

    
> NPE in calendar if enableManualInput=true
> -----------------------------------------
>
>                 Key: RF-12327
>                 URL: https://issues.jboss.org/browse/RF-12327
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-input
>    Affects Versions: 4.2.2.Final
>         Environment: Any
>            Reporter: Paul Dijou
>            Priority: Minor
>             Fix For: 4.3.0.Milestone2
>
>
> If you set {{enableManualInput="true"}} in a {{rich:calendar}}, you get a NullPointerException :
> {code}
> Caused by: java.lang.NullPointerException
> 	at org.richfaces.renderkit.html.CalendarRenderer.convertToBoolean(CalendarRenderer.java:112) [richfaces-components-ui-4.3.0-SNAPSHOT.jar:4.3.0-SNAPSHOT]
> 	at org.richfaces.renderkit.html.CalendarRenderer.doEncodeEnd(CalendarRenderer.java:270) [richfaces-components-ui-4.3.0-SNAPSHOT.jar:4.3.0-SNAPSHOT]
> 	at org.richfaces.renderkit.RendererBase.encodeEnd(RendererBase.java:175) [richfaces-components-ui-4.3.0-SNAPSHOT.jar:4.3.0-SNAPSHOT]
> {code}
> Searching a bit, it seems it looks for a "readonly" attribute : see https://github.com/richfaces/components/blob/develop/input/ui/src/main/templates/calendar.template.xml#L39 , there is a component.attributes['readonly'] but on last VDL of calendar ( http://docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/calendar.html ), there is no "readonly" attribute and I couldn't find any in RichFaces component Java code neither.
> So my guess would be :
> - if enableManualInput="false", then the test at line 270 of CalendarRenderer ends and all works fine
> - if enableManualInput="true", then the same test try to convert "readonly" attribute to boolean, but since it doesn't exist, it tries to convert a null value and bim, NPE !

--
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