Seam : How to display messages from MessageDrivenBean in view ?
Joined: May 12, 2010
in order to get to know Seam and especially JMS I wanted to write a little chat-web-app where 2 chatters can communicate with each other. (I am a blooy beginner in J2EE in general).
Therefore 2 MDBs shall pull and put the messages in 2 different queues.
For the example I have only 1 sender, 1 queue, 1 receiver, 1 receiverInbox, 1 view.
Until now I handled it as following (I assume, that it could be the wrong approach, but I wanted to know whether it works this way) :
My code :
inbox (pseudo-singleton) --> this is the class, which shall feed the view with info (at least in my approach) :
So far the message is returned as outputtext in the view. (does not work because of failures in view?).
Actually I wanted to display the messages in listboxes/textfields (like chat windows) but I dont know how to handle them in Seam (JSF).
So my questions are :
1.) Does anyone know how I can use listboxes to display messages ?
2.) Is it even possible to delegate the messages from a Message Driven Bean to a JSF-component -> listbox ?
Every hint is much appreciated, I am desperated right now