[
https://jira.jboss.org/jira/browse/JBSEAM-3147?page=com.atlassian.jira.pl...
]
Michael Youngstrom resolved JBSEAM-3147.
----------------------------------------
Resolution: Done
So looking at the code in 2.1 it appears this has been greatly reworked so that this but
may not be as much of an issue anymore. It appears that StatusMessages as 2 main methods
that add a StatusMessage to the task list:
1. If the message is "global".
In this case it appears that the message key will be translated and the message
interpolated immediately upon adding the message to the system which would fix the issue I
have above.
2. If the message is bound to a control
In this case the message is not immediately translated and interpolated but instead
deferred till later. Which may be by design since I cannot think of a case where I would
want to add a message to a control and then navigate to a different page?
So this issue might be already fixed in 2.1. So, I'm going to go ahead and close this
issue for now unless someone else thinks that the case 1 and 2 situations are not
correct.
Mike
FacesMessage I18N keys are evaluated differently between
"redirect" and "render" navigations
--------------------------------------------------------------------------------------------
Key: JBSEAM-3147
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3147
Project: Seam
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.0.2.SP1
Reporter: Michael Youngstrom
Assignee: Michael Youngstrom
Fix For: 2.0.3.CR2, 2.1.0.BETA1
When using FacesMessages.addFromResourceBundle() message resolution is deferred until
after the phase it was added in. Though I'm not exactly sure why it is done this way
it is causing problems with "render" vs "redirect" navigations. In
the case of a "render" the Pages component changes the current viewID prior to
the end of the phase. So when the FacesMessages component processes it's
FacesMessages at the end of the phase the viewId is going to be different than what it
would be for a "redirect". This can be a problem if you are using Seam Page
bundles. IMO the message really should come from the page where the action was invoked
not the destination page.
If the FacesMessage component defers FacesMessage creation because it wants to do
interpolation after the phase is complete perhaps we can change FacesMessages to
immediately look up the message key and then lazily interpolate that message? I can go
ahead and fix this if nobody has an objection.
Mike
--
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