This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding error message to FacesContext from action method  RSS feed

 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a datatable containing values. On row click I display the description of that particular record.

In this page there is an update button, when the user clicks update he is directed to different page having the same fields but with some of them editable and a save and cancel button

If user enters some value and clicks save, and the update is successfull then the previous page needs to be shown with the success message.

For this,I had added error message to FacesContext from update action method, but the message never got displayed. I guess this is due to the fact that different FacesContext instance gets created after action method is returned due to forward or sendRedirect.

What is the workaround for this?

Regards,
Joshua
 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed! removed <redirect /> from navigation rule

Regards,
Joshua
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!