You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ted <r6...@gmail.com> on 2011/06/27 16:31:34 UTC
h:messages in myfaces 2.1.1 not displaying
Hi, is anyone currently successfully using h:messages in myfaces 2.1.1?
I've used this tag before in the sun reference implementation, there's not
much to it, just
<h:messages infoClass="infoMessages" errorClass="errorMessages" />
is all I use. I know I'm setting the message properly because I have my
PROJECT_STAGE is development and so it's rendering my message at the bottom
of the browser page. My h:messages tag however is doing absolutely nothing
at all. It's just being removed.
anyone have this anomaly or is there something special about this tag in
myfaces?
--
Ted.
Re: h:messages in myfaces 2.1.1 not displaying
Posted by Jakob Korherr <ja...@gmail.com>.
Hi,
Since JSF 2.0, unrendered FacesMessages are rendered by h:body shortly
before the closing body tag (</body>), if ProjectStage is Development
(see org.apache.myfaces.view.facelets.compiler.BodyEndElementInstruction
for the code).
Normally using the following code should work as expected:
<html>
<h:head>..</h:head>
<h:body>
...
<h:messages />
....
</h:body>
</html>
..because the explicit h:messages tag should render all FacesMessages
and thus the implicit one should not find any more to render.
Please check if you're using <h:messages> inside of <h:body> and if
you still see the bug, please report it in our issue tracker at [1].
(Maybe this is a side-effect of one of the optimizations done in that
area, but I actually don't know for sure).
Regards,
Jakob
[1] https://issues.apache.org/jira/browse/MYFACES
2011/6/27 Ted <r6...@gmail.com>:
> Hi, is anyone currently successfully using h:messages in myfaces 2.1.1?
>
> I've used this tag before in the sun reference implementation, there's not
> much to it, just
>
> <h:messages infoClass="infoMessages" errorClass="errorMessages" />
>
> is all I use. I know I'm setting the message properly because I have my
> PROJECT_STAGE is development and so it's rendering my message at the bottom
> of the browser page. My h:messages tag however is doing absolutely nothing
> at all. It's just being removed.
>
> anyone have this anomaly or is there something special about this tag in
> myfaces?
> --
> Ted.
>
--
Jakob Korherr
blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at