javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1951

Restoring of dynamic component fails when parent is also dynamic

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.4
    • Fix Version/s: None
    • Component/s: view handling
    • Labels:
      None
    • Environment:

      Windows XP, Tomcat 6.20

    • Status Whiteboard:
      Hide

      size_small importance_large

      Show
      size_small importance_large

      Description

      In our application we add a components dynamically during partial page refreshes.

      After upgrading to 2.0.4 this stopped working. Investigation showed that on subsequent partial page refreshes dynamic children that had dynamic parents were being restored.

      In StateManagementStrategyImpl.restoreView the call

      viewRoot.invokeOnComponent(context, finalCur.parentClientId,...

      was failing to find the parent. This turned out to be because the parent had not been added to the tree at the point the child was being added.

      The solution is to ensure that the dynamic child list is ordered so that dynamic components are always after their parents.

      I have a patch for this that works for us, I've attached it.

      1. mojarra.patch
        3 kB
        jsinglet
      2. mojarra2.patch
        3 kB
        jsinglet

        Issue Links

          Activity

          Hide
          jsinglet added a comment -

          Updated patch, previous version didn't recreate components in the correct order.

          Show
          jsinglet added a comment - Updated patch, previous version didn't recreate components in the correct order.
          Hide
          jsinglet added a comment -

          This seems to be fixed in 2.1.x see JAVASERVERFACES-1680

          Show
          jsinglet added a comment - This seems to be fixed in 2.1.x see JAVASERVERFACES-1680
          Hide
          Manfred Riem added a comment -

          This issue is a duplicate

          Show
          Manfred Riem added a comment - This issue is a duplicate
          Hide
          Manfred Riem added a comment -

          Since this is duplicate see it for more information

          Show
          Manfred Riem added a comment - Since this is duplicate see it for more information

            People

            • Assignee:
              Manfred Riem
              Reporter:
              jsinglet
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: