javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2079

impossible to change project stage away from development

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      tomcat 7-10, JSF 2.1.1-b04, FCS

      Description

      this exacerbates issue JAVASERVERFACES-1922, where others also point out they are unable to change PROJECT_STAGE in any way

      using the context parameter:

      <context-param>
      <param-name>javax.faces.PROJECT_STAGE</param-name>
      <param-value>XXXX</param-value>
      </context-param>

      has no effect. development stage remains as development

      even this PhaseListener, which casts to the mojarra impl and attempts to force change the field through reflection does nothing:

      =========================================
      @Override
      public void beforePhase(PhaseEvent arg0) {

      ApplicationImpl ai=(ApplicationImpl) FacesContext.getCurrentInstance().getApplication();

      try {
      if (ai.getProjectStage()==ProjectStage.Development )

      { Field f=ai.getClass().getDeclaredField("projectStage"); f.setAccessible(true); f.set(ai, ProjectStage.Production); }

      } catch (Exception e)

      { e.printStackTrace(); }

      }

      ========================================

        Issue Links

          Activity

          Hide
          rogerk added a comment -

          fix version

          Show
          rogerk added a comment - fix version
          Hide
          rogerk added a comment -

          fix version

          Show
          rogerk added a comment - fix version
          Hide
          rogerk added a comment -

          fix version

          Show
          rogerk added a comment - fix version
          Hide
          Ed Burns added a comment -

          Sending jsf-test/JAVASERVERFACES-2079/build.xml
          Transmitting file data .
          Committed revision 9169.

          Show
          Ed Burns added a comment - Sending jsf-test/ JAVASERVERFACES-2079 /build.xml Transmitting file data . Committed revision 9169.
          Hide
          deepakpn added a comment -

          Hi,

          What is the expected behavior as of Glassfish 3.3.0.
          It looks like setting the javax.faces.PROJECT_STAGE to Production in
          web.xml has no effect and it still remains to be "Development" if done so.

          Glassfish 3.3.0 release notes contains a note on working around a
          bug in Mojarra JSF:


          When running a JSF application in JSF2 PROJECT_STAGE="Development" mode, you may see the follow warning appear at the bottom of the page: "Form component needs to have a UIForm in its ancestry.".
          This issue is caused by a bug in Mojarra JSF, a suggested work-around is to set the JSF2 PROJECT_STAGE="Production" in the web.xml file.

          This wouldn't work for me since I'm not able to change the PROJECT_STAGE.
          Is there a different work-around for the above Mojarra JSF issue?

          Thanks.

          Show
          deepakpn added a comment - Hi, What is the expected behavior as of Glassfish 3.3.0. It looks like setting the javax.faces.PROJECT_STAGE to Production in web.xml has no effect and it still remains to be "Development" if done so. Glassfish 3.3.0 release notes contains a note on working around a bug in Mojarra JSF: — When running a JSF application in JSF2 PROJECT_STAGE="Development" mode, you may see the follow warning appear at the bottom of the page: "Form component needs to have a UIForm in its ancestry.". This issue is caused by a bug in Mojarra JSF, a suggested work-around is to set the JSF2 PROJECT_STAGE="Production" in the web.xml file. — This wouldn't work for me since I'm not able to change the PROJECT_STAGE. Is there a different work-around for the above Mojarra JSF issue? Thanks.

            People

            • Assignee:
              Ed Burns
              Reporter:
              jstrong
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: