Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: General
    • Labels:
      None

      Description

      The saved state of UIInput needs to be cleaned. The default values should not be saved.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        3m 47s 1 Marius Petoi 30/Jul/10 15:23
        Patch Available Patch Available Resolved Resolved
        4h 34m 1 Leonardo Uribe 30/Jul/10 19:58
        Resolved Resolved Closed Closed
        47d 9h 13m 1 Leonardo Uribe 16/Sep/10 05:11
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Fix Version/s 2.0.2 [ 12315348 ]
        Fix Version/s 2.0.2-SNAPSHOT [ 12315118 ]
        Hide
        Leonardo Uribe added a comment -

        Thanks to Marius Petoi for provide this patch

        Show
        Leonardo Uribe added a comment - Thanks to Marius Petoi for provide this patch
        Leonardo Uribe made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Leonardo Uribe [ lu4242 ]
        Fix Version/s 2.0.2-SNAPSHOT [ 12315118 ]
        Resolution Fixed [ 1 ]
        Hide
        Leonardo Uribe added a comment -

        I checked it and the patch had a small bug (use value instead key). On postback, every instance of UIInput save the following values.

        Before

        [submittedValue, null, localValueSet, false, valid, true, value, null]

        After

        Validation success : [localValueSet, false, value, null, submittedValue, null]
        Validation fail : [submittedValue, , valid, false]

        So, with the change we reduce two slots (valid) when validation is succesful and four slots (value, localValueSet) when validation fails. I think we can reduce even more the state if the changes proposed to fix UIData component state MYFACES-2616 are introduced (with transient variables, we can store this values there and just before save the state move it to the delta stuff if necessary) but for now I think it is ok.

        Show
        Leonardo Uribe added a comment - I checked it and the patch had a small bug (use value instead key). On postback, every instance of UIInput save the following values. Before [submittedValue, null, localValueSet, false, valid, true, value, null] After Validation success : [localValueSet, false, value, null, submittedValue, null] Validation fail : [submittedValue, , valid, false] So, with the change we reduce two slots (valid) when validation is succesful and four slots (value, localValueSet) when validation fails. I think we can reduce even more the state if the changes proposed to fix UIData component state MYFACES-2616 are introduced (with transient variables, we can store this values there and just before save the state move it to the delta stuff if necessary) but for now I think it is ok.
        Marius Petoi made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Marius Petoi made changes -
        Field Original Value New Value
        Attachment uiInputStateCleanup.patch [ 12450907 ]
        Hide
        Marius Petoi added a comment -

        The patch I added modifies _DeltaStateHelper.put() not to add null values when no other value has previously been saved. Also, when setValid(true) is invoked, this value is not set unless a different value has been set before. This avoids saving the default true value in the saved state. The same goes for localValueSet.

        Show
        Marius Petoi added a comment - The patch I added modifies _DeltaStateHelper.put() not to add null values when no other value has previously been saved. Also, when setValid(true) is invoked, this value is not set unless a different value has been set before. This avoids saving the default true value in the saved state. The same goes for localValueSet.
        Marius Petoi created issue -

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Marius Petoi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development