You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Michael Heinen (JIRA)" <de...@myfaces.apache.org> on 2010/02/26 14:10:28 UTC

[jira] Commented: (TOMAHAWK-1494) HtmlMessageRenderer evaluates value expressions of not rendered components

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838857#action_12838857 ] 

Michael Heinen commented on TOMAHAWK-1494:
------------------------------------------

exact class is org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer

> HtmlMessageRenderer evaluates value expressions of not rendered components
> --------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1494
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1494
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Message(s)
>    Affects Versions: 1.1.9
>         Environment: tomahawk12_1.1.9, 
> myfaces 1.2.8,
> richfaces 3.3.3
> jsp
>            Reporter: Michael Heinen
>            Priority: Critical
>
> I produced a validation error in an inputText field. This field ha a corresponding outputLabel component.
> Now HtmlMessageRenderer creates a Map with all inputLabels, even if they are not rendered at all.
> This can result in exceptions because the value attribute of not rendered and not initialized components is evaluated!
> Sample content:
> <t:div rendered="false">
>   <t:outputLabel id="abcabcLbl"  for="abcabc" value="#{MyController.testme} "/>
>   <t:inputText id="abcabc" value="#{requestScope['test222']}"/>
> </t:div>
> Method MyController.getTestme() is called if messages are rendered although the parent div component has attribute rendered=false
> proposed fix:
>   if (root.isRendered()) 
> should be added to method createOutputLabelMap.
> Components should not be checked recursively if the root is not rendered at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.