MyFaces Core
  1. MyFaces Core
  2. MYFACES-3463

Refactor UIRepeat code to implement PSS algorithm like UIData and fix state behavior

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.12, 2.1.6
    • Fix Version/s: 2.0.13, 2.1.7
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Right now, the code in org.apache.myfaces.view.facelets.component.UIRepeat has not been reviewed more than to fix issues related to JSF 2 spec. It works, but it can be done better.

      The code has the following opportunities:

      • Implement PSS algorithm, to prevent store data in the state.
      • The algorithm used in UIData to handle state is better.
      • Fix MYFACES-3415
      1. MYFACES-3463-1.patch
        40 kB
        Leonardo Uribe

        Issue Links

          Activity

          Hide
          Leonardo Uribe added a comment -

          I reviewed the code and created a patch, taking what's necessary from UIData. At the end the code has two differences:

          • State for rows (rowState) was saved into the state. This is not necessary because the information for EditableValueHolder is usually send to the client and then go back to the server. UIData do that and there is no reason why UIRepeat cannot do it.
          • The condition for reset model if a validation occur is based only on the messages related to components in UIRepeat. In UIData, the condition is different. To solve MYFACES-3415 it is preferred to do the same as UIData does. Anyway, this should be discussed on the EG, because the condition is not very clear and there is other issue (MYFACES-3326) that suggest this condition should be enhanced.

          If no objections I'll commit the code soon (on 2.0.x and 2.1.x branches)

          Show
          Leonardo Uribe added a comment - I reviewed the code and created a patch, taking what's necessary from UIData. At the end the code has two differences: State for rows (rowState) was saved into the state. This is not necessary because the information for EditableValueHolder is usually send to the client and then go back to the server. UIData do that and there is no reason why UIRepeat cannot do it. The condition for reset model if a validation occur is based only on the messages related to components in UIRepeat. In UIData, the condition is different. To solve MYFACES-3415 it is preferred to do the same as UIData does. Anyway, this should be discussed on the EG, because the condition is not very clear and there is other issue ( MYFACES-3326 ) that suggest this condition should be enhanced. If no objections I'll commit the code soon (on 2.0.x and 2.1.x branches)

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development