0

I have some FacesMessage inside my bean. I noticed that all of them which are invoked by actionListener are not getting displayed.

My form contains multiple fields having FacesMessage associated. At the end, it is having a submit button, which is having an actionListener like below-

<p:commandButton style="margin-top: 20px;" value="#{msg.submit}" update=":message" actionListener="#{agent.run()}" action="#{agent.showResults()}"/>

The p:growl is declared inside a common_template.xhtml page like this-

<p:growl id="message" showDetail="true" life="3000" />

I am getting all the FacesMessage except which are invoked by above p:commandButton.

I am using PrimeFaces 3.5 with GlassFish 3.1.2 in my Ubuntu 10.04 LTS machine.

Objective

Using actionListener, I am doing some I/O operations (time consuming operations). Based on these operations, I just want to notify to user about success/failure.

Any alternative or fix/hack?

ravi
  • 6,140
  • 18
  • 77
  • 154
  • Take a look at this question: http://stackoverflow.com/questions/3909267/differences-between-action-and-actionlistener It give you the difference between action and actionListener. – Tankhenk May 22 '13 at 09:17
  • @Tankhenk: Actually using `actionListener` I am doing some I/O operations (time consuming operations) and based on these operations, I just want to notify to user about success/failure. Any alternative or fix/hack? – ravi May 22 '13 at 10:54
  • Maybe you can use polling. Take a look in the primefaces showcase here: http://www.primefaces.org/showcase/ui/pollStartStop.jsf – Tankhenk May 22 '13 at 11:21
  • @Tankhenk: How can I modify polling to notify messages i.e. `p:growl`? Can you please elaborate a lit more? – ravi May 22 '13 at 14:31

0 Answers0