[
https://issues.jboss.org/browse/RF-7351?page=com.atlassian.jira.plugin.sy...
]
Stephane Daviet commented on RF-7351:
-------------------------------------
Can confirm the bug too under RichFaces 4.0.0.Final. It seems the problem comes from this
part of JS code that doesn't take {{isGlobalOnly}} into account:
{code:javascript|title=messages.js, lines 31-49}
var onMessage = function (event, element, data) {
var content = $(rf.getDomElement(this.id));
var sourceId = data.sourceId;
var message = data.message;
if (!this.options.forComponentId) {
if (!message) {
// rf.csv.clearMessage
var element;
while(element=rf.getDomElement(this.id+':'+sourceId)){
$(element).remove();
}
} else {
renderMessage.call(this,sourceId,message);
}
} else if (this.options.forComponentId === sourceId) {
content.empty();
renderMessage.call(this,sourceId,message);
}
}{code}
Actually, can't find occurence of {{globalOnly}} in any JS.
Using Spring too, it's difficult to extract a sample. But can confirm while debugging
both JS and Java that Spring doesn't seem to play any role in this bug.
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, 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
Assignee: Lukáš Fryč
Fix For: 4.Future
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.
For more information on JIRA, see:
http://www.atlassian.com/software/jira