Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with h:message. Someoone Please help  RSS feed

 
Raja Pam
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to display error messages on JSF page...

Added following Line in ManagedBean.



Added following in JSP:



Problem is i'm not get any message even when any exception occured.

Request to please help..

Thanks.
 
Guy deLyonesse
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you associate an h:message tag with a specific control you're normally only going to see errors associated with it (validation errors, for example.) If yuo want a message tag that displays all the messages in the validation queue, use h:messages and don't use a for attribute.
 
sam sami
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
remove Tag Attribute "for"
 
Ankit Thakkar
Ranch Hand
Posts: 33
Android Java Mac PPC
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try debugging issue with <h:messages> to know whether validation messages are got added. If you want to capture validation messages for a particular component then you need to pass component id while adding messages to facesContext like.... component.getClientId(getFacesContext())

Thanks,
Ankit
 
Raja Pam
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot...

Your suggestions helped me..
I used <h:messages>... It was perfect.

Thanks once again...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!