[
https://jira.jboss.org/jira/browse/JBSEAM-3340?page=com.atlassian.jira.pl...
]
Wolfgang Schwendt commented on JBSEAM-3340:
-------------------------------------------
"The patch is useless it has too many white space changes. "
yes, shame on me :-(
Lame excuse: This is also why I called it "preliminary patch" or "emergency
patch"
"Can you report the message interpolation bug clearly please"
I'm very tired now which increases my mistakes. Could be totally wrong what I'm
saying now. If I remember correctly, I referred to the following problem regarding
interpolation:
In StatusMessages the Runnable(), which calls message.interpolate(params), was only added
if
message.getSummary() was not empty.
But when looking at the old code of StatusMessage, "summary" was always empty
after executing the constructor for StatusMessage. In fact, it was
StatusMessage.interpolate which assigned a value to
StatusMessage.summary. Therefore the Runnable was never added and the interpolation
never called.
"I've fixed the problem with messages with no keys not being added in trunk.
Please test. "
will do either later today or tomorrow
StatusMessages: addition of ConfigRedirectHandler messages is broken
--------------------------------------------------------------------
Key: JBSEAM-3340
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3340
Project: Seam
Issue Type: Bug
Components: Core
Environment: Seam 2.1.0 Rev 8823
Reporter: Wolfgang Schwendt
Priority: Critical
Fix For: 2.1.0.CR1
Attachments: StatusMessages.patch.diff.txt
XML schema Pages-2.1.xsd allows the specification of an error message for any declared
exception handler:
Example:
<exception class="org.jboss.seam.framework.EntityNotFoundException">
<end-conversation/>
<redirect view-id="/error.xhtml">
<message>#{messages['notFoundMsg']}</message>
</redirect>
</exception>
Right now as of Seam 2.1.0 Rev 8823, however, the error message is not added to the
FacesContext, whereas with previous versions of Seam the functionality worked fine.
org.jboss.seam.exception.RedirectHandler is not the problem. The bug is in
org.jboss.seam.international.StatusMessages.
StatusMessages.add(Severity severity, String messageTemplate, Object... params) calls
StatusMessages.add(severity, null, null, messageTemplate, null, params), setting the
key-Parameter (resourceBundleKey) to null.
The implementation of StatusMessages.add(Severity severity, String key, String detailKey,
String messageTemplate, String messageDetailTemplate, final Object... params) checks
whether the key is empty.
if (!Strings.isEmpty(key)) ...
But because the supplied key is null, the error message is never added to the
FacesContext! Further, there is another bug in the logic which calls the message
interpolation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira