[ https://issues.apache.org/jira/browse/TOMAHAWK-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862119#action_12862119 ]
Michael Heinen commented on TOMAHAWK-1494: ------------------------------------------ Leonardo, I am of course not happy with closing this as invalid and I don't understand your scepticism. Every change in every class could lead to inconsistencies. Why should someone need a message for an inner component if the parent is not rendered at all? In this case the component is also not rendered. The current behavior is unpredictable for everyone in my eyes. Developers must be aware of that simple messages could lead to initializations of not rendered components. This may not only have impact on performance if managed beans are initialized with a lot of state which shouldn't be initialized. This means furthermore that an app behaves in an other way if beans are initialized that way. It is no alternative to add all rendered checks of all parents of an outputLabel to the label again, or? This is not maintainable. What about adding a new boolean property to the messages tag, whether not rendered components should be evaluated? The old behavior would be ensured and this bug could also be avoided. > 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 > Assignee: Leonardo Uribe > 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.