Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Example as follows:
      1) A facelet called Entry.xhtml

      <h:form>
      <table>
      <tr>
      <td>First Name:</td>
      <td>
      <h:inputText id="fname" value="#

      {flash.firstName}

      "required="true"/>
      </td>
      </tr>
      <tr>
      <td>Last Name:</td>
      <td>
      <h:inputText id="lname" value="#

      {flash.lastName}

      " required="true"/>
      </td>
      </tr>
      </table
      <p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
      /></p>
      </h:form>

      and the confirmation.xhtml:
      <table>
      <tr>
      <td>First Name:</td>
      <td>
      <h:outputText value="#

      {flash.keep.firstName}

      " />
      </td>
      </tr>
      <tr>
      <td>Last Name:</td>
      <td>
      <h:outputText value="#

      {flash.keep.lastName}

      "/>
      </td>
      </tr>
      </table>
      <h:form>
      <p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
      </h:form>

      But when the confirmation page is loaded, the firstName and lastName I submitted
      is missing. Why? I am using flash.keep. According to what I read it should
      keep the values more than a PRG cycle.
      It works if I use Mojarra.

        Activity

        Jakob Korherr created issue -
        Hide
        Jakob Korherr added a comment -
        Show
        Jakob Korherr added a comment - Thread on the myfaces user mailing list: http://www.mail-archive.com/users@myfaces.apache.org/msg56758.html
        Leonardo Uribe made changes -
        Field Original Value New Value
        Attachment MYFACES-3009-1.patch [ 12468075 ]
        Leonardo Uribe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Leonardo Uribe added a comment -

        Attached to this mail there is a patch for this issue. After doing some step-by-step on the example, I notice we are not calling elContext.setPropertyResolved(true) when flash.keep is used, and in this specific case, the value to be promoted is not on request map, so we are not returning it correctly.

        It is weird that flash.keep() method does not return the value. I would like to have a simple method for this one instead do a workaround through request map, but I think it is the most simple solution we have without introduce some coupling between FlashELResolver and FlashImpl.

        If no objections, I'll commit this patch soon.

        Show
        Leonardo Uribe added a comment - Attached to this mail there is a patch for this issue. After doing some step-by-step on the example, I notice we are not calling elContext.setPropertyResolved(true) when flash.keep is used, and in this specific case, the value to be promoted is not on request map, so we are not returning it correctly. It is weird that flash.keep() method does not return the value. I would like to have a simple method for this one instead do a workaround through request map, but I think it is the most simple solution we have without introduce some coupling between FlashELResolver and FlashImpl. If no objections, I'll commit this patch soon.
        Hide
        Jakob Korherr added a comment -

        No objections on my side!

        It seems like a hack at first sight, but I agree that this is better than having to rely on FlashImpl internals!

        Show
        Jakob Korherr added a comment - No objections on my side! It seems like a hack at first sight, but I agree that this is better than having to rely on FlashImpl internals!
        Leonardo Uribe made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Jakob Korherr [ jakobkorherr ] Leonardo Uribe [ lu4242 ]
        Resolution Fixed [ 1 ]
        Leonardo Uribe made changes -
        Fix Version/s 2.0.4-SNAPSHOT [ 12315977 ]
        Leonardo Uribe made changes -
        Fix Version/s 2.0.4 [ 12316153 ]
        Fix Version/s 2.0.4-SNAPSHOT [ 12315977 ]
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        7d 11h 56m 1 Leonardo Uribe 11/Jan/11 23:25
        Patch Available Patch Available Resolved Resolved
        9d 4h 31m 1 Leonardo Uribe 21/Jan/11 03:57
        Resolved Resolved Closed Closed
        18d 23h 35m 1 Leonardo Uribe 09/Feb/11 03:32

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Jakob Korherr
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development