Dot no mix JSF Implementations
We can find several JSF Implementations and several components that help us to develop JSF applications. Each implementation/component has its particular behavior. Some implementations that we can find are: Mojarra and MyFaces. Some components are: Primefaces, Icefaces and Richfaces.
A JSF implementation is a library with codes that works as described in JSF specification. They are independent, do not need of any other JSF library to work. A JSF component needs a JSF implementation to work correctly. In a JSF application it is possible to user Icefaces with MyFaces.
A JSF developer must be cautious when choosing which implementation to use and if there is the need of any other JSF component. A JSF component is a very useful resource with very good features. The developer must have in mind that several problems may happen when a mix of products (implementations and components) happens.
Often it is possible to find on internet problems when Primefaces and Richfaces components are mixed. A known problem that happened last year was the mixing of “p:tooltip” with a “rich:calendar”, the Primefaces component stopped working.
MyFaces is a JSF implementation that comes with several components that make easier to develop with JSF; if the component chosen is the Primefaces the creator of the Primefaces indicate to use it with Mojarra implementation. A developer must always think about the pros/cons of each implementation/component, study what each creator indicates and only after this study chose an implementation.
To finish this matter, the message below is displayed by the JBoss when more than one JSF implementation was found. By default the JBoss provides an JSF implementation and if the application does not provide any configuration do ignore the JBoss JSF implementation (you can see the configuration in the topic “Upgrading from JSF 1.2 to 2.0“), the JBoss will have problem to choose between which implementation to use: “WARN [JBossJSFConfigureListener] MyFaces JSF implementation found! This version of JBoss AS ships with the java.net implementation of JSF. There are known issues when mixing JSF implementations. This warning does not apply to MyFaces component libraries such as Tomahawk. However, myfaces-impl.jar and myfaces-api.jar should not be used without disabling the built-in JSF implementation. See the JBoss wiki for more details.”