webtier@glassfish.java.net

Re: [webtier] JSF2: Detecting conversion errors in Ajax requests

From: <webtier_at_javadesktop.org>
Date: Tue, 02 Mar 2010 12:21:36 PST

You're right. Thank you!!! Now, the messages are shown.

Indeed, I had [i]both[/i] a global [b]<h:messages/>[/b] tag, and also a specific [b]<h:message for="inAge"/>[/b] tag on the page. I just didn't think of including them in the [b]render[/b] clause of the [b]<f:ajax...>[/b] tag

I suppose the reason is that I'm used to working with ADF Faces and there the messages are re-rendered automatically, I don't have to re-render them [i]explicitly[/i].

I suppose it would be a nice feature of Mojarra itself to re-render the messages automatically -- the global ones as well as the ones attached to components that were re-rendered. For example, If I specify:

[code]
<f:ajax render="myComp"... />
[/code]

then Mojarra could re-render the following elements:

1. The element with [b]id="myComp"[/b]
2. [b]<h:message for="myComp" .../>[/b], if there are messages for the component.
3. [b]<h:messages/>[/b], if available on the page and if there are messages

That's just a convenience, of course. It's not absolute necessity. Probably I like it this way because I'm used to it being this way in ADF Faces.

Again, thank you for your help!
[Message sent by forum member 'vesuvius' (vesuvius_prime_at_hotmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=389691