I am porting some applications from DeltaSpike to JEE 8. I am using Apache MyFaces as JSF 2.3 implementation, and Primefaces 8.0 on top of it.
There are some beans annotated with ´#WindowScoped´ in the legacy code. How to do this with JSF 2.3?
Many thanks in advance!
just use DeltaSpike, there is no "JSF native" alternative yet. It will likely be available in Faces 4.0: https://github.com/eclipse-ee4j/faces-api/issues/1509
Related
is it possible to use JSF 2.1/Icefaces 3.3.0 implementation with Websphere 9?
In that case, have you any guide/tutorial that can help me?
Thank you in advance!
Although WebSphere 9 provides an EE7 runtime (that is JSF 2.2), JSF 2.1 and ICEfaces 3.3.0 should work. You need to follow IBM's instructions [1] for using a "third-party JSF implementation": provide the JSF 2.1 implementation and its dependencies, as well as ICEfaces, in an isolated shared library. The caveat with this approach is that WebSphere does not support CDI+JSF integration for this scenario.
[1] https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.5/com.ibm.websphere.nd.multiplatform.doc/ae/tweb_jsf22.html
As the questions states, is OmniFaces compatible with JSF 2.2?
Will it have dependencies only on JSF or other Java EE dependencies as well? I.e. will it be able to run just with Tomcat + JSF?
OmniFaces 1.6 showcase application has been tested on GlassFish 4 with Mojarra 2.2.2 and Tomcat 7.0.42 with Mojarra 2.2.3. There were no problems when using OmniFaces 1.6 with Mojarra 2.2.x. Only Glassfish 4 has a problem with using the #{now} and #{startup} beans from OmniFaces, but this is not OmniFaces' fault. For any known issues you can keep track of known issues wiki.
OmniFaces 1.x has no other required dependencies than Servlet, EL and JSF, with the minimum versions 2.5, 2.1 and 2.0 respectively. Tomcat already provides Servlet and EL out the box. You only need to supply JSF yourself (which in turn has a dependency on JSTL 1.2 which is also absent on Tomcat).
Does "Tomahawk for JSF 2.0" works for JSF 2.1 / MyFaces Core 2.1 ?
If not, a new release "Tomahawk for JSF 2.1" is expected/announced anytime soon ?
If not, will there be any downside using "Tomahawk for JSF 2.0" and JSF 2.0 / MyFaces Core 2.0
I am upgrading from MyFaces 1.2.6 + Facelets 1.1.15-jsf1.2 (using lots of templates)
Thanks very much in advance.
Regards,
Kumar.
Yes, Tomahawk for JSF 2.0 will work just fine for JSF 2.1. We also use it in production.
JSF 2.1 is not a specification change, but merely a maintenance release. JSF 1.2 -> 2.0 was however a major specification change and that's why JSF 1.x targeted component libraries won't work for JSF 2.x.
I am using jboss 4.0 and Java 1.5. I want to use JSF, but I know that this version is fit to JSF 1.1 version. Is it possible to use the latest JSF version on JBoss 4.0?
As JSF API is built on top of JSP/Servlet API, the maximum supported JSF version depends on the maximum supported JSP/Servlet version.
JSF 1.0 and 1.1 requires a minimum of Servlet 2.4 / JSP 2.0.
JSF 1.2 works on Servlet 2.4, but requires a minimum of JSP/EL 2.1 which goes hand in hand with Servlet 2.5, so it requires after all Servlet 2.5. If you replace JSP 2.1 by Facelets 1.x as default view technology, then you can use JSF 1.2 on Servlet 2.4.
JSF 2.0 which uses by default Facelets 2.x requires a minimum of EL 2.1 which goes hand in hand with Servlet 2.5, so it requires after all Servlet 2.5. If you supply your own EL 2.1 API/impl, then you can in theory run JSF 2.0 on Servlet 2.4.
JSF 2.1 requires a minimum of Servlet 3.0 and Java 1.6 (6.0).
JBoss 4.x is a Servlet 2.4 container. So if you stick to JSP, then you can at highest use JSF 1.1. But if you replace JSP by Facelets 1.x, then you can use JSF 1.2. JSF 1.2 offers as the most important advantages the possibility to get rid of <f:verbatim>, to use <f:setPropertyActionListener>, to use #PostConstruct, etc.
JSF 2.0 is in theory possible, but I don't guarantee that it will work 100% as I am not fully aware of any possible side effects. I have as far only run it successfully with a very basic test page with an ajax form and a view scoped bean on Tomcat 5.5. It might fail when it goes into the complex. See also Running JSF 2.0 on Servlet 2.4 container.
Can we mix JSF RI 1.1 with Tomahawk, Primefaces, MyFaces, etc in one application?
You can mix JSF component libraries (Tomahawk, RichFaces, PrimeFaces, etc), but you cannot mix JSF implementations. Sun RI and Apache MyFaces are both JSF implementations. You have to choose the one or other. Any component library ought to work flawlessly with any of the implementations. Which implementation to choose depends on whether it is solid and well-developed. For JSF 1.1, I'd suggest to pick MyFaces. For JSF 1.2 and 2.0, I'd suggest to pick Mojarra (the Sun RI).
PrimeFaces does not support JSF 1.1., it has been designed for JSF 2.0 so we've decided not to support 1.1. at the beginning of the project. Yet JSF 1.2 is well supported.
From my experience, there's a lot of compatibility issues when mixing JSF RI and Myfaces libraries like Tomahawk, especially on JSF 1.1.