MyFaces Core
  1. MyFaces Core
  2. MYFACES-3294

REGRESSION: 2.0.7->2.0.8: Facets lost after validation error POST-back

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9, 2.1.3
    • Component/s: None
    • Labels:
      None

      Description

      Hi guys,

      As per Martin's request on MYFACES-3293, and possibly related to MYFACES-3117, there appears to have been a regression in state saving between 2.0.7 -> 2.0.8. To reproduce:

      1. Deploy the attached WAR
      2. Click 'Add Personal Contact'
      3. Click 'Save' (without entering any values, therefore getting a validation error)
      4. Upon validation error, note CSS styles have disappeared from many parts of the XHTML! In particular around the table and buttons
      5. Switch the 2.0.8 JARs for 2.0.7, and it works fine

      My renderer uses facets to determine the CSS styles. This incorrect behaviour is new to 2.0.8.

      1. addressbook-faces2.war
        5.41 MB
        Kennard Consulting

        Activity

        Hide
        Kennard Consulting added a comment -

        Example application that demonstrates state saving problem

        Show
        Kennard Consulting added a comment - Example application that demonstrates state saving problem
        Hide
        Martin Kočí added a comment -

        I've change this to blocker, because I'm able to reproduce this in general : for example, component.getAttributes().put("required", true) is lost on post back.

        Show
        Martin Kočí added a comment - I've change this to blocker, because I'm able to reproduce this in general : for example, component.getAttributes().put("required", true) is lost on post back.
        Hide
        Leonardo Uribe added a comment -

        I have tested it and the bug was introduced solving MYFACES-3257.

        If you set this param:

        <context-param>
        <param-name>org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS</param-name>
        <param-value>false</param-value>
        </context-param>

        The example will work as expected. Anyway, we need to fix the algorithm that use visitTree.

        Show
        Leonardo Uribe added a comment - I have tested it and the bug was introduced solving MYFACES-3257 . If you set this param: <context-param> <param-name>org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS</param-name> <param-value>false</param-value> </context-param> The example will work as expected. Anyway, we need to fix the algorithm that use visitTree.
        Hide
        Leonardo Uribe added a comment -

        Unfortunately we have a bug that prevents all components that are partial to be saved correctly. It is a typo error, but unfortunately it makes this part does not work correctly.

        Show
        Leonardo Uribe added a comment - Unfortunately we have a bug that prevents all components that are partial to be saved correctly. It is a typo error, but unfortunately it makes this part does not work correctly.
        Hide
        Leonardo Uribe added a comment -

        Thanks for report this issue

        Show
        Leonardo Uribe added a comment - Thanks for report this issue
        Hide
        Kennard Consulting added a comment -

        Leonardo,

        I never cease to be impressed by your prompt responses and resolutions. It has been such a pleasure reporting bugs to you over the past few months, knowing they will always be processed quickly and with gratitude. Thanks for your support.

        Regards,

        Richard.

        Show
        Kennard Consulting added a comment - Leonardo, I never cease to be impressed by your prompt responses and resolutions. It has been such a pleasure reporting bugs to you over the past few months, knowing they will always be processed quickly and with gratitude. Thanks for your support. Regards, Richard.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development