You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org> on 2006/05/04 20:16:18 UTC
[jira] Commented: (MYFACES-1298) The 'for' attribute on
should be required to avoid a NullPointerException
[ http://issues.apache.org/jira/browse/MYFACES-1298?page=comments#action_12377861 ]
Mike Kienenberger commented on MYFACES-1298:
--------------------------------------------
h:outputLabel's for attribute is required to be optional by the spec, so we can't change that.
I'm going to move this to a bug report against t:messages. Fixing it was already on my list of things to do as I also saw this error in my own application yesterday.
> The 'for' attribute on <h:outputLabel> should be required to avoid a NullPointerException
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-1298
> URL: http://issues.apache.org/jira/browse/MYFACES-1298
> Project: MyFaces Core
> 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