Re: Problem with DynaView – Seam 2.2.0

Splash Forums PrettyFaces Users Problem with DynaView – Seam 2.2.0 Re: Problem with DynaView – Seam 2.2.0

#22161

There are several older posts on how to get Seam 2 to work with PrettyFaces.

The problem is that you need to be able to access a bean that *IS* available during method execution, for instance a normal JSF (non-Seam) bean. Otherwise because Seam has not yet started itself when DynaView is executed, there is no bean from which to execute the method.

For instance, the same holds true for injecting parameters into such a bean:

http://stackoverflow.com/questions/1266733/prettyfaces-with-seam-beans

The same holds true for Action Methods:

http://stackoverflow.com/questions/4448656/seam-and-prettyfaces

Which is also the same problem you are experiencing here with DynaView. Try creating a standard JSF RequestScoped bean from which to execute the method. But most of the time, DynaView is more of a convenient workaround for something that could be accomplished via creative use of templating in the views themselves.

This is a technical limitation of Seam 2 I am afraid… their contexts really should be started in a Filter, not a PhaseListener.

~Lincoln