Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display "message sent" after to invoke commandButton ?  RSS feed

 
Gustavo Siqueira
Ranch Hand
Posts: 97
C++ Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See my code xhtml:



My class Java:



it not worked!
 
Brendan Healey
Ranch Hand
Posts: 218
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You're doing a full page submit which is why the message doesn't appear, but something like this should do what you want
(note that you're specifying null as the id in addMessage() so you need h:messages, to get the h:message components to
render you need to give them ids and include them in the render= attribute value of the f:ajax tag):



Regards,
Brendan.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!