[
https://issues.jboss.org/browse/RF-7351?page=com.atlassian.jira.plugin.sy...
]
Mano Swerts commented on RF-7351:
---------------------------------
Thanks David,
Some extra info on the workaround.
The workaround as described above doesn't work in our case since facesMessages is not
available (we don't have a seam-application like the reporter of this issue
described).
However, we got the workaround to work by doing something similar.
{code}
.hidden {
display: none !important;
}
styleClass="#{workaroundForGlobalMessagesBug.showMessages() ? '' :
'hidden'}"
public boolean showMessages() {
Iterator<String> clientIds =
FacesContext.getCurrentInstance().getClientIdsWithMessages();
while (clientIds.hasNext()) {
String clientId = clientIds.next();
if (clientId == null) {
return true;
}
}
return false;
}
{code}
The thing I don't completely get is that it doesn't work using the rendered
property on rich:messages, we have to hide it with css.
Not sure why, but it seems to mess up the whole render-response part.
Regression: "messages: globalOnly does not work properly"
---------------------------------------------------------
Key: RF-7351
URL:
https://issues.jboss.org/browse/RF-7351
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-output, regression
Affects Versions: 3.3.1, 4.0.0.Final
Environment: Windows / JBoss 4.2.2.GA / Seam 2.1.1.GA / RichFaces 3.3.1.GA
Reporter: Joseph Miller
Labels: spring
Fix For: 4.1.0.CR1
Attachments: example-globalOnly-bug.zip, example-globalOnly-bug.zip, Screen shot
2011-04-22 at 16.22.11.png, Screen shot 2011-04-27 at 08.51.26.png, Screen shot 2011-04-27
at 08.52.49.png
Time Spent: 4 hours
Remaining Estimate: 0 minutes
Looks like a regression of RF-615... I've upgraded my Seam project to sue RF 3.3.1,
in order to fix a number of other bugs, but now messages intended for a single UI
component (via the for= ) are appearing in the global messages list at the top of my
page.
My page template has:
<rich:messages globalOnly="true" id="page-messages">
...
</rich:messages>
and the controls have:
<rich:message for="my-control-id" id="my-control-id-message">
...
</rich:message>
I can switch the rich:messages to h:messages, and it behaves as it should. Also reverting
back to the RichFaces 3.2.2.SR1 jars makes the problem go away, but I get the other older
bugs back :(
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira