myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno Aranda (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TOMAHAWK-414) The 'for' attribute on <h:outputLabel> should be required to avoid a NullPointerException
Date Fri, 05 May 2006 08:29:18 GMT
    [ http://issues.apache.org/jira/browse/TOMAHAWK-414?page=comments#action_12377980 ] 

Bruno Aranda commented on TOMAHAWK-414:
---------------------------------------

But then that would break the JSF 1.1 spec regarding to the outputLabel component. We shuldn't
look for a "for" component in the tree if the "for" attribute is not specified.

[1] http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/h/outputLabel.html

> The 'for' attribute on <h:outputLabel> should be required to avoid a NullPointerException
> -----------------------------------------------------------------------------------------
>
>          Key: TOMAHAWK-414
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-414
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Message(s)
>     Versions: 1.1.2-SNAPSHOT
>  Environment: Doesn't matter.
>     Reporter: Val Blant
>     Priority: Minor

>
> If you use the <t:messages> tag in conjunction with <h:outputLabel> without
specifying the 'for' attribute, the page will not render and an exception will be thrown:
> java.lang.NullPointerException: expr
> 	at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:210)
> 	at org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(HtmlMessageRenderer.java:200)
> This could be easily avoided by declaring the 'for' attribute as required in the TLD.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message