javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1680

Re-creation of composite component children/facets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,680
    • Status Whiteboard:
      Hide

      size_large importance_large

      Show
      size_large importance_large
    • Tags:

      Description

      Encountered while analyzing the following thread:

      http://mail-archives.apache.org/mod_mbox/myfaces-
      dev/201005.mbox/%3c4BF34C9E.3010108@oracle.com%3e

      The current implementations of <composite:insertFacet>/<composite:insertChildren> results in
      components be removed from their original parents and inserted into the composite component
      implementation in response to PostAddToViewEvents. As a result, when subsequently executing tags
      against an existing component tree (on postback), the relocated components will no longer be found in
      their original locations and will be re-created. This has two problems:

      1. Re-creating these components/subtrees is unnecessarily expensive.
      2. Re-creating these components/subtrees results in a loss of state - ie. components are reset to their
      initial state.

      #2 means that stateful components, such as Trinidad's <tr:showDetail>, cannot be used as composite
      component children/facets.

      A possible solution might be to follow the pattern used by the Facelets
      <ui:composition>/<ui:define>/<ui:insert> - ie. use a TemplateClient to ensure that the components
      are inserted in the desired target location during tag execution.

      1. 1680-in-progress.patch
        3 kB
        Ed Burns
      2. changebundle.txt
        5 kB
        sheetalv

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Looks good. r=edburns.

          Please make sure to include the issuetracker URL and the list of modified files in your svn commit
          log message.

          I prefer to just edit the changebundle.txt to remove the diffs, then do svn commit -F
          changebundle.txt <filelist>

          It's always good to explicitly list the files to be committed on the svn commit line so you don't
          inadvertently commit something.

          Commit it to HEAD. Then, when the http://rindge.sfbay.sun.com:7070/hudson/ shows clear on the
          JSF_HEAD jobs, commit to MOJARRA_2_0X_ROLLING.

          Show
          Ed Burns added a comment - Looks good. r=edburns. Please make sure to include the issuetracker URL and the list of modified files in your svn commit log message. I prefer to just edit the changebundle.txt to remove the diffs, then do svn commit -F changebundle.txt <filelist> It's always good to explicitly list the files to be committed on the svn commit line so you don't inadvertently commit something. Commit it to HEAD. Then, when the http://rindge.sfbay.sun.com:7070/hudson/ shows clear on the JSF_HEAD jobs, commit to MOJARRA_2_0X_ROLLING.
          Hide
          sheetalv added a comment -

          fixed in r=8550 of the trunk.
          and r=8552 of 2.0.4 branch.

          Show
          sheetalv added a comment - fixed in r=8550 of the trunk. and r=8552 of 2.0.4 branch.
          Hide
          sheetalv added a comment -

          Though TemplateClient API is the way to go for this issue's solution, we have
          decided that we will not fix it for now. We do have a solution in place that
          works. It is'nt the best solution as far as performance is concerned. The
          current solution works in a bunch of scenarios pointed out as being problematic
          in the email thread in the above comments.
          We will look into fixing this issue with the TemplateClient API in the next release.

          Show
          sheetalv added a comment - Though TemplateClient API is the way to go for this issue's solution, we have decided that we will not fix it for now. We do have a solution in place that works. It is'nt the best solution as far as performance is concerned. The current solution works in a bunch of scenarios pointed out as being problematic in the email thread in the above comments. We will look into fixing this issue with the TemplateClient API in the next release.
          Hide
          Ed Burns added a comment -

          We really need to fix this the right way.

          Show
          Ed Burns added a comment - We really need to fix this the right way.
          Hide
          Mathias Werlitz added a comment -

          The problem description is very similar to what I found out goes wrong when analyzing JAVASERVERFACES-2040 and JAVASERVERFACES-2053. I also already created a patch for the re-creation issue.

          Show
          Mathias Werlitz added a comment - The problem description is very similar to what I found out goes wrong when analyzing JAVASERVERFACES-2040 and JAVASERVERFACES-2053 . I also already created a patch for the re-creation issue.

            People

            • Assignee:
              Manfred Riem
              Reporter:
              aschwart
            • Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: