You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2011/02/05 21:19:30 UTC
[jira] Created: (MYFACES-3030) CLONE - Its not possible to change
the summary/ detail message of a ParametrizableFacesMessage
CLONE - Its not possible to change the summary/ detail message of a ParametrizableFacesMessage
----------------------------------------------------------------------------------------------
Key: MYFACES-3030
URL: https://issues.apache.org/jira/browse/MYFACES-3030
Project: MyFaces Core
Issue Type: Bug
Components: General
Affects Versions: 1.1.8
Reporter: Jerry Meurs
We are using a PhaseListener in the render response phase to change the summary message of a FacesMessage
{code}
public void beforePhase(PhaseEvent phaseEvent) {
...
Iterator componentMessages = facesContext.getMessages(clientId);
while (componentMessages.hasNext()) {
FacesMessage message = (FacesMessage)componentMessages.next();
StringBuilder builder = new StringBuilder();
builder.append(label);
builder.append(message.getSummary());
message.setSummary(builder.toString());
}
}
{code}
The problem is that since MyFaces 1.1.8 a ParametrizableFacesMessage is used for required messages. While doing a getSummary() the _evaluatedSummary is evaluated once, so effectively you can not change the _evaluatedSummary after one call to getSummary().
My questions:
1. Is this desired behaviour?
2. In MyFaces 1.1.7 a FacesMessage was used instead of a ParametrizableFacesMessage, is there a configurable way to runtime use a FacesMessage instead of a ParametrizableFacesMessage?
3. I suppose another workaround would be to add a label argument to each component which will be evaluated by the ParametrizableFacesMessage, is there any documentation how this functionality is intended to work?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (MFCOMMONS-27) CLONE - Its not possible to change
the summary/ detail message of a ParametrizableFacesMessage
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MFCOMMONS-27?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MFCOMMONS-27.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.2-SNAPSHOT
Assignee: Leonardo Uribe
> CLONE - Its not possible to change the summary/ detail message of a ParametrizableFacesMessage
> ----------------------------------------------------------------------------------------------
>
> Key: MFCOMMONS-27
> URL: https://issues.apache.org/jira/browse/MFCOMMONS-27
> Project: MyFaces Commons
> Issue Type: Bug
> Components: myfaces-commons-utils
> Affects Versions: 1.0.1
> Reporter: Jerry Meurs
> Assignee: Leonardo Uribe
> Fix For: 1.0.2-SNAPSHOT
>
>
> We are using a PhaseListener in the render response phase to change the summary message of a FacesMessage
> {code}
> public void beforePhase(PhaseEvent phaseEvent) {
> ...
> Iterator componentMessages = facesContext.getMessages(clientId);
> while (componentMessages.hasNext()) {
> FacesMessage message = (FacesMessage)componentMessages.next();
> StringBuilder builder = new StringBuilder();
> builder.append(label);
> builder.append(message.getSummary());
> message.setSummary(builder.toString());
> }
> }
> {code}
> The problem is that since MyFaces 1.1.8 a ParametrizableFacesMessage is used for required messages. While doing a getSummary() the _evaluatedSummary is evaluated once, so effectively you can not change the _evaluatedSummary after one call to getSummary().
> My questions:
> 1. Is this desired behaviour?
> 2. In MyFaces 1.1.7 a FacesMessage was used instead of a ParametrizableFacesMessage, is there a configurable way to runtime use a FacesMessage instead of a ParametrizableFacesMessage?
> 3. I suppose another workaround would be to add a label argument to each component which will be evaluated by the ParametrizableFacesMessage, is there any documentation how this functionality is intended to work?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira