Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.4
    • Fix Version/s: 1.1.5
    • Component/s: JSR-127
    • Labels:
      None

      Description

      Every phase in LifecycleImpl looks like:

      private boolean applyRequestValues(FacesContext facesContext, PhaseListenerManager phaseListenerMgr)
      throws FacesException
      {
      boolean skipFurtherProcessing = false;
      if (log.isTraceEnabled()) log.trace("entering applyRequestValues in " + LifecycleImpl.class.getName());

      try {
      phaseListenerMgr.informPhaseListenersBefore(PhaseId.APPLY_REQUEST_VALUES);

      if(isResponseComplete(facesContext, "applyRequestValues", true))

      { // have to return right away return true; }

      if(shouldRenderResponse(facesContext, "applyRequestValues", true))

      { skipFurtherProcessing = true; }

      facesContext.getViewRoot().processDecodes(facesContext);
      } finally

      { phaseListenerMgr.informPhaseListenersAfter(PhaseId.APPLY_REQUEST_VALUES); }

      if (isResponseComplete(facesContext, "applyRequestValues", false)

      shouldRenderResponse(facesContext, "applyRequestValues", false)) { // since this phase is completed we don't need to return right away even if the response is completed skipFurtherProcessing = true; }

      if (!skipFurtherProcessing && log.isTraceEnabled())
      log.trace("exiting applyRequestValues in "
      + LifecycleImpl.class.getName());
      return skipFurtherProcessing;
      }

      And that is repeated as many times as phases are. The fix will be to extract the common behavior in a method, that receives one additional parameter - PhaseExecutor and delegate to it the real execution.

      1. ApplyRequestValuesExecutor.java
        0.4 kB
        Nikolay Petrov
      2. InvokeApplicationExecutor.java
        0.4 kB
        Nikolay Petrov
      3. LifecycleImpl.java
        7 kB
        Nikolay Petrov
      4. PhaseExecutor.java
        0.2 kB
        Nikolay Petrov
      5. ProcessValidationsExecutor.java
        0.4 kB
        Nikolay Petrov
      6. RenderResponseExecutor.java
        0.8 kB
        Nikolay Petrov
      7. RestoreViewExecutor.java
        4 kB
        Nikolay Petrov
      8. UpdateModelValuesExecutor.java
        0.4 kB
        Nikolay Petrov

        Activity

        Hide
        Matthias Weßendorf added a comment -
        Show
        Matthias Weßendorf added a comment - ICLA listed here: http://people.apache.org/~jim/committers.html
        Hide
        Martin Marinschek added a comment -

        Hi guys,

        Nikolay has sent me offline both the CLA and the fax confirmation (that he really sent it to the ASF). Both is allright - but the CLA has never been recorded. I'll fax out the CLA again, hopefully it gets recorded this time!

        regards,

        Martin

        Show
        Martin Marinschek added a comment - Hi guys, Nikolay has sent me offline both the CLA and the fax confirmation (that he really sent it to the ASF). Both is allright - but the CLA has never been recorded. I'll fax out the CLA again, hopefully it gets recorded this time! regards, Martin
        Hide
        Paul Spencer added a comment -

        Where are we on getting the ICLA?

        Paul Spencer

        Show
        Paul Spencer added a comment - Where are we on getting the ICLA? Paul Spencer
        Hide
        Manfred Geiler added a comment -

        Just checked the ICLA files.
        It has still not arrived (or been processed).
        Nikolay, can you please check, what could have happened to your fax?

        Thanks,
        Manfred

        Show
        Manfred Geiler added a comment - Just checked the ICLA files. It has still not arrived (or been processed). Nikolay, can you please check, what could have happened to your fax? Thanks, Manfred
        Hide
        Martin Marinschek added a comment -

        He's already faxed in an ICLA - it hasn't been processed so far, but it will surely be done before the next release, I suppose.

        By the way - Nikolay started his own JSF-implementation, called IFaces on sourceforge. Everything he's doing there is under ASL as well. I could convince him that he'd try it with us a little, and that he gives us a little help where MyFaces needs polishing.

        Let's keep the issue opened until we see his ICLA has been processed.

        regards,

        Martin

        Show
        Martin Marinschek added a comment - He's already faxed in an ICLA - it hasn't been processed so far, but it will surely be done before the next release, I suppose. By the way - Nikolay started his own JSF-implementation, called IFaces on sourceforge. Everything he's doing there is under ASL as well. I could convince him that he'd try it with us a little, and that he gives us a little help where MyFaces needs polishing. Let's keep the issue opened until we see his ICLA has been processed. regards, Martin
        Hide
        Wendy Smoak added a comment -

        Especially given the comment on the issue that these did not come in
        with the licence header, I think we need an iCLA for this. I'm
        uncomfortable with having @author tags for someone who hasn't signed
        an agreement. (At least, I don't see this name on Jim's page [1].)

        [1] http://people.apache.org/~jim/committers.html

        Show
        Wendy Smoak added a comment - Especially given the comment on the issue that these did not come in with the licence header, I think we need an iCLA for this. I'm uncomfortable with having @author tags for someone who hasn't signed an agreement. (At least, I don't see this name on Jim's page [1] .) [1] http://people.apache.org/~jim/committers.html
        Hide
        Martin Marinschek added a comment -

        Thanks to Nikolay Petrov for this excellent cleanup patch.

        Nikolay, for the future:

        • please add the ASL-License header on top of every file you attach as a patch.
        • please send patches (create a patch, and not send the full file)

        regards,

        Martin

        Show
        Martin Marinschek added a comment - Thanks to Nikolay Petrov for this excellent cleanup patch. Nikolay, for the future: please add the ASL-License header on top of every file you attach as a patch. please send patches (create a patch, and not send the full file) regards, Martin
        Hide
        Nikolay Petrov added a comment -

        PhaseExecutor with implementation for different phases.

        Show
        Nikolay Petrov added a comment - PhaseExecutor with implementation for different phases.
        Hide
        Nikolay Petrov added a comment -

        PhaseExecutor with implementation for different phases.

        Show
        Nikolay Petrov added a comment - PhaseExecutor with implementation for different phases.
        Hide
        Nikolay Petrov added a comment -

        PhaseExecutor with implementation for different phases.

        Show
        Nikolay Petrov added a comment - PhaseExecutor with implementation for different phases.
        Hide
        Nikolay Petrov added a comment -

        the changed LifecycleImpl

        Show
        Nikolay Petrov added a comment - the changed LifecycleImpl

          People

          • Assignee:
            Martin Marinschek
            Reporter:
            Nikolay Petrov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development