myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3591) Labels with EL expressions are not shown in messages if partial state saving is disabled
Date Wed, 29 Aug 2012 03:27:08 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443779#comment-13443779
] 

Leonardo Uribe commented on MYFACES-3591:
-----------------------------------------

I have checked the example and the problem here is the behavior for f:loadBundle itself. In
some cases, f:loadBundle is not executed, and the EL expression is evaluated, returning an
empty string (by EL coercion rules).

Since f:loadBundle comes from JSF 1.1 and since JSF 1.2  it is possible to set message bundles
in faces-config.xml, this behavior was silently ignored (because the problem is only visible
when f:loadBundle is used). It sounds reasonable to check for empty string in this case and
if that so, check if the EL expression is set and use it. I think the current behavior is
correct, but the proposed solution is convenient and cause no side effects.



                
> Labels with EL expressions are not shown in messages if partial state saving is disabled
> ----------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3591
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3591
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.8
>         Environment: tested with tomhawk20-1.1.12 and 1.1.13.
> and with tomcat 6.0.35 and 7.0.29
>            Reporter: Michael Heinen
>         Attachments: zMsgs.war
>
>
> I have a simple form with two required fields. 
> First field has label with plain text. 
> Second field has a label with an EL expression.
> The label with the EL expression is not shown in messages if javax.faces.PARTIAL_STATE_SAVING
is set to false. 
> The error occurs with myfaces 2.1.8.
> It works correctly with mojarra 2.1.11
> Sample:
> <h:form id="myform">
>   <h:inputText id="name" value="#{myController.name}" required="true"  label="Hardcoded
name" />
>   <h:inputText id="password" value="#{myController.password}" required="true" label="#{msgs['password']}"/>

>  <h:commandButton id="loginButton"
>                   action="#{myController.login}"
>                   value="Login"/>
> <t:messages id="idMsgs"
>             showDetail="false"
>             showSummary="true"
>             replaceIdWithLabel="true"/>
> </h:form>
> This is currently a blocker for an update from JSF 1.2 to 2.1

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message