• 2 replies
  • Latest Post - ‏2013-05-07T11:01:05Z by TuukkaIlomäki
354 Posts

Pinned topic Cannot change version of project facet JavaServer Faces to 1.2

‏2013-05-06T13:34:31Z |

I have an EGL JSF project that I just imported into RBD 8.5.  When I try to change the JavaServer faces version from 1.1 to 1.2 I get an error.  The error says "Cannot change version of project facet JavaServer Faces to 1.2".  Why am I getting this error and how do I resolve the error?

  • PengFeiYu
    29 Posts

    Re: Cannot change version of project facet JavaServer Faces to 1.2


    It seems to be Eclipse WTP bug: user cannot change the JSF faces for a existing project via the UI. See this:

    To bypass this, you can manually edit the configuration file. Go to "Navigator" view, then open .settings\org.eclipse.wst.common.project.facet.core.xml, change the <installed facet="jst.jsf" version="1.1"/> to <installed facet="jst.jsf" version="1.2"/>

    However, even you changed the faces to 1.2, I think it won't bring in any surprise because EGL JSF is based on JSF spec 1.1, and you may get some issue at runtime. We have handled some PMR for such case, that's why we published the technote:

    It it not recommended to upgrade the JSF facet to 1.2 and above in EGL JSF Web project, we can still stay on JSF 1.1 spec and use the 1.2 and above implementation shipped with WAS or SUN RI in Tomcat.

  • TuukkaIlomäki
    80 Posts

    Re: Cannot change version of project facet JavaServer Faces to 1.2


    First, as a background I belong to the group that PengFeiYu above refers to as "We have handled some PMR for such case". I also started relevant discussion at JSF 2.0 support in RBD (even if the nice folks responsible for the forum migration decided to rename me as SystemAdmin).

    The result of a PMR of ours was to stick with JSF 1.1 specification and upgrade to JSF 1.2 runtime. (The technote was published long after we did the upgrade.) However, I have all the time been thinking of what would happen (in addition to being supported...) if we were to use the part of JSF 1.2 specification that has nothing to do with RBD or EGL. For example, the following code performs just as expected when setting JSF facet to 1.2 and using JSF 1.2 runtime:

    <h:inputText id="porkkana" value="#{mypage.intValue}" binding="#{mypage.intValue_Ref}" converterMessage="popsi popsi porkkanaa" />

    You cannot use converterMessage attribute if using JSF 1.1 runtime - it is not in the TLD. In fact, you can use the attribute even if JSF facet of the project is provided that runtime is JSF 1.2. I cannot see why we could not use for example attribute converterMessage - as far as I understand it does not go through any code generated from EGL (or RBD for that matter). However, we have not been bold enough to try that in production. I would be happy to hear if someone has.