Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3385

Entered values for input fields conatined in a Composite Component are lost, if the CC is used in a datatable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1.2
    • 2.0.10, 2.1.4
    • None
    • None

    Description

      Assume, a Composite Component contains input fields, i.e any subclass of EditableValueHolder (e.g. inputText, inputTextarea, ..). If this CC is than used in a subclass of UIData, e.g. a dataTable, the values entered in the CCs input fields get lost (despite for the last row in the Model of the UIData object).

      This seems to be related to the fact how the method "saveDescendantComponentStates(..)" of the UIData class checks, if a component has childs, whos state must be saved, before changing the rowIndex. The mentioned method only checks "child.getChildCount() > 0", but getChildCount() is 0 for a CC. I assume it would be necessary to check the FacetCount for a CC instead.

      The attached WAR file can help to reproduce the issue with a simple example.

      Attachments

        1. MyFacesCCUIData212Test.war
          3.73 MB
          Michael Dietrich
        2. MYFACES-3385-1.patch
          1 kB
          Leonardo Uribe

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              m.dietrich Michael Dietrich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: