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

Setting Messages  RSS feed

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a messages component on my page that is suppose to display error whenever a button is clicked but when i click the button the page reappears without the error message. in the action method i have

 
Max Moore
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you have this line?

<h:messages globalOnly="false" layout="table"></h:messages>
 
A. Dusi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to remain in the same page but with the message, try
return "";//or any string that is not in the config file.
instead of
return "failed";

If it is a different page that you want the message to be displayed, do not put <redirect/> in your config file for the underlying navigation rule taking the outcome 'failed'.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!