[
https://issues.jboss.org/browse/RF-7351?page=com.atlassian.jira.plugin.sy...
]
Mano Swerts updated RF-7351:
----------------------------
Attachment: Screen shot 2011-04-27 at 08.51.26.png
Screen shot 2011-04-27 at 08.52.49.png
Hi guys,
We investigated the issue further by debugging the RichFaces JavaScript code.
We noticed that both the <rich:messages globalOnly="true" /> component and
the <rich:message for="inputField" /> component bind to an
"onMessage" event.
When the event is triggered on tab, the "onMessage" function in
"message.js.faces" is triggered for both components.
As you can see in the attached screenshots the function is called twice: once for both
components. Other <rich:message /> components which have a "for" attribute
related to other fields are not triggered, just as expected.
In the JavaScript code, we can see that a check is performed on the availability of the
"forComponentId" attribute. If this attribute is available, a validation message
is rendered for the specified component id. If this is not available, a global message is
rendered.
But when a global message is rendered, we cannot see any check on the globalOnly
attribute. So any message is rendered, regardless of this attribute. The attribute is
nowhere to be found in the JavaScript code.
We were wondering if this is the bug or if there is an other piece of code that is
responsible for checking whether only global error messages may be displayed?
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
Environment: Windows / JBoss 4.2.2.GA / Seam 2.1.1.GA / RichFaces 3.3.1.GA
Reporter: Joseph Miller
Assignee: Jan Jamrich
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