You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by SO...@austin.rr.com on 2007/03/16 22:26:54 UTC

and not working

I tried the suggestion of using forceId to specify the id of the
component for which I need to generate a message, and I also created a
property binding to get the client id.  I did the latter mostly to check
that forceId was working and it was.  The problem is that the messages
are not being shown on the page.  In the case of page level validation
error messages, those do show up.  The error messages that dont show up
are those that are added using FacesContext.addMessage() in the backing
bean.  I am sure I am specifying the correct client id in the backing,
the messages simply don't show up.  What could possibly be going wrong?
 Any help would be greatly appreciated.

Re: Can you addMessage() from an Action method?

Posted by Adrian Mitev <ad...@googlemail.com>.
You can do this with success. This web site is pretty old.

2007/3/17, SOSELLA@austin.rr.com <SO...@austin.rr.com>:
>
> From all examples, it appears that you should be able to call
> addMessage() from within an action method, but when I try this, the
> message is not displayed.  Contrarily, I found this discussion where it
> says that it isn't possible:
>
> http://jsf-faq.com/faqs/messages.html
>
> and that you have to use a validator.  I tried using a validator and it
> did work (the message gets displayed); however, I think that this
> approach is rather limiting.  There are errors that are dependent on
> more than one input.
>
> I am out of ideas.  Can you call addMessage() from within an action
> method and have the error messages (via <h:message for="" />) show up?
>
> Thanks.
>

Can you addMessage() from an Action method?

Posted by SO...@austin.rr.com.
>From all examples, it appears that you should be able to call
addMessage() from within an action method, but when I try this, the
message is not displayed.  Contrarily, I found this discussion where it
says that it isn't possible:

http://jsf-faq.com/faqs/messages.html

and that you have to use a validator.  I tried using a validator and it
did work (the message gets displayed); however, I think that this
approach is rather limiting.  There are errors that are dependent on
more than one input.

I am out of ideas.  Can you call addMessage() from within an action
method and have the error messages (via <h:message for="" />) show up?

Thanks.