Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Components/Renderers
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      795
    • Status Whiteboard:
      Hide

      size_small importance_medium

      Show
      size_small importance_medium

      Description

      From the mail "State saving of UIViewParameter" on jsr-314-open:

      UIViewParameter uses the submittedValue to store its value in the state for the
      next postback, because obviously the view parameter won't be in the request
      parameter map of the next request (which is the postback). But because its
      submittedValue is null after the conversions and validations, it has to be set
      again before the state is generated. To accomplish that, the spec currently
      states to override encodeAll() and make the call to setSubmittedValue() there.
      In addition, encodeAll() has to be called in UIViewRoot.encodeEnd() for every
      UIViewParameter in the view. This works perfectly for normal requests, but when
      you are using an AJAX request the state is generated before
      UIViewRoot.encodeEnd() is called an thus the submittedValue for every
      UIViewParameter is null in the state. This means that the value of every
      UIViewParameter will be null in the following request.

      Now the easiest solution to this problem, which I also already committed to
      MyFaces trunk (again see [1] for details), is to do mostly the same as in
      UIViewRoot.encodeEnd() just also in PartialViewContext.
      processPartial() when the PhaseId is RENDER_RESPONSE before the state is
      generated to make it work for AJAX-requests.

      However I don't really like this solution, because we have to think of handling
      UIViewParameters in a special way every time we change something on any render
      mechanism. Why don't we just override saveState() on UIViewParameter and set the
      submittedValue there before the state is saved. This will have the same result,
      but without the code in UIViewRoot, PartialViewContext and
      UIViewParameter.encodeAll() and without future headaches. I also already
      uploaded a patch for this to the MyFaces issue at [1].

      Answer to this from Martin Marinschek: "This is just a so much better solution
      . We should spec this one."

      [1] https://issues.apache.org/jira/browse/MYFACES-2645

        Activity

        Hide
        Ed Burns added a comment -

        Move to 2.1.

        I agree with this approach.

        Show
        Ed Burns added a comment - Move to 2.1. I agree with this approach.
        Hide
        Ed Burns added a comment -

        triage

        Show
        Ed Burns added a comment - triage
        Hide
        Ed Burns added a comment -

        rogerk

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

        triage

        Show
        rogerk added a comment - triage
        Hide
        rogerk added a comment -

        triage

        Show
        rogerk added a comment - triage
        Hide
        kithouna added a comment -

        Was anything ever done for this one?

        Show
        kithouna added a comment - Was anything ever done for this one?
        Hide
        nullone added a comment -

        Myfaces team took 3 days to review and accept the fix, and Mojarra team could not do the same thing for more than 33 months, and still saw no light.

        Is that really amazing or the team is sleeping on its way?

        Show
        nullone added a comment - Myfaces team took 3 days to review and accept the fix, and Mojarra team could not do the same thing for more than 33 months, and still saw no light. Is that really amazing or the team is sleeping on its way?
        Hide
        Ed Burns added a comment -

        Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
        Hide
        Manfred Riem added a comment -

        Set priority to Major

        Show
        Manfred Riem added a comment - Set priority to Major

          People

          • Assignee:
            Unassigned
            Reporter:
            Jakob Korherr
          • Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: