Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

How to add and update a message during a backing bean listener?  RSS feed

Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I got a Composite Component with a class anotated with @FacesComponent that has a ActionListener, ValueChangeListener and much more.

My Problem is that in some situations I do need to add a FacesMessage and update my p:messages tag with the new message.

I Tried everything to solve this problem... but the p:messages is not rendering my messages.

Maybe because the Faces Messages is rendered only after the complete JSFLife Cycle and as far i know... JSF Listeners do not obey the normal JSF Life Cycle.

How can I add the message?

Thank's for your help.
Posts: 20360
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF listeners do, in fact participate in the JSF lifecycle. What part of the lifecycle the listener is invoked in depends on what kind of listener it is. However, most listeners post messages by throwing Exceptions, not by attempting to attach them to the FacesContext.
ice is for people that are not already cool. Chill with this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!