How to pass data from JSF to Java applet

I am creating a web application with JSF and ICEFaces. Now I have included a Java applet in one of the JSF pages.

The question is, how can I pass the information stored in the bean backup to the applet? I don't think I got bi-directional communication. I am collecting data using ICEFaces input components. For example, clicking a button causes the applet to reload with newly collected data.

thanks

+1


source to share


2 answers


Well, in the end, I think your applet should represent some sort of representation of your model. This way, in the context of MVC, your JSF will be your view / control and you will have some kind of backend model. Your applet is another look at this model, so you need your applet to be an observer or listener on your model, and when JSF makes changes to the model, you should fire event / notification observers representing the model change.



+1


source


Something like the following in your Applet tag?

<param name="welcomeMessage" value="<h:outputText value="#welcomeMessage"/>">

      



(Sorry for the JSF inaccuracies)

And then use getParameter as usual inside the applet.

+1


source







All Articles