1

In my JSF app I need to display FacesMessage from another thread. Acording to docs it's not possible. But maybe there is some trick to do so? I can't see another way to do what I wan't to :(

lotk
  • 384
  • 7
  • 20
  • I want to display a message that the thread did something (it is making some operations in the while(true) loop and if there is no more data in the database it could process it calls wait - that's the moment I want to display a message, later some other user action calls notify). – lotk Sep 13 '11 at 12:05
  • Is it possible to choose a certain JSF implementation/framework? Please see my answer. – Zeemee Sep 13 '11 at 12:11

1 Answers1

0

Maybe you can solve your problem with asynchronous background work with ICEfaces server side push.
Pleas take a look at http://auctionmonitor.icefaces.org/auctionMonitor/auctionMonitor.jsf for an example of the push technology.

Your background working thread could perform a "push", which will "notify" certain pages to update (partially) and display your message.

Zeemee
  • 10,486
  • 14
  • 51
  • 81
  • are you spamming the site? You provided identical answers here and here: http://stackoverflow.com/questions/7399517/how-to-update-the-gui-from-another-thread/7401733#7401733 –  Sep 13 '11 at 12:30
  • @Code Monkey: It's a duplicate question (which I flagged), so I duplicated my answer too. May one of them survive. – Zeemee Sep 13 '11 at 15:00
  • It's not a duplicate per the exact duplicate guidelines. –  Sep 13 '11 at 16:23