javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1991

Submitted value of UIInput gets lost inside composite components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.3, 2.0.4, 2.1.0
    • Fix Version/s: 2.1.11, 2.2.0-m05
    • Labels:
      None
    • Environment:

      JDK 1.6, Tomcat 6

    • Status Whiteboard:
      Hide

      size_large importance_medium

      Show
      size_large importance_medium
    • Tags:

      Description

      When a UIInput component are nested inside composite components, its submittedValue gets lost and is not rendered on validation errors.

      This simple example fails:
      <myCC:layout>
      <h:inputText>
      <f:validateLength minimum="20"/>
      </h:inputText>
      </myCC:layout>

      The issue is present if the composite component inserts its childs with <cc:insertChildren />. When using facets with <cc:renderFacet /> it works correctly.

      This issue seems to have a strong relation to JAVASERVERFACES-1825 because the conditions and possible workarounds are very similar.
      Both bugs are really blockers. Composite components become useless this way.

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          I don't understand why InsertChildrenHandler.apply() is called once on
          the initial render and twice on the postback. That seems incorrect.

          Show
          Ed Burns added a comment - I don't understand why InsertChildrenHandler.apply() is called once on the initial render and twice on the postback. That seems incorrect.
          Hide
          Ed Burns added a comment -

          I don't understand why InsertChildrenHandler.apply() is called once on
          the initial render and twice on the postback. That seems incorrect.

          Show
          Ed Burns added a comment - I don't understand why InsertChildrenHandler.apply() is called once on the initial render and twice on the postback. That seems incorrect.
          Hide
          Mathias Werlitz added a comment -

          Hi Ed,

          yes, JAVASERVERFACES-1985 is the problem here and is part of the problem of JAVASERVERFACES-2040. Please see my analysis of JAVASERVERFACES-2040. InsertChildrenHandler.apply() is added and called twice because the component tree is rebuild a second time before rendering.

          My patch for JAVASERVERFACES-2040 will fix (at least a part of) JAVASERVERFACES-1985. It does not remove the "hack approach" but the components will not be recreated and the "listener hack" will only executed once.

          Show
          Mathias Werlitz added a comment - Hi Ed, yes, JAVASERVERFACES-1985 is the problem here and is part of the problem of JAVASERVERFACES-2040 . Please see my analysis of JAVASERVERFACES-2040 . InsertChildrenHandler.apply() is added and called twice because the component tree is rebuild a second time before rendering. My patch for JAVASERVERFACES-2040 will fix (at least a part of) JAVASERVERFACES-1985 . It does not remove the "hack approach" but the components will not be recreated and the "listener hack" will only executed once.
          Hide
          Manfred Riem added a comment -

          Using the attached example I am unable to reproduce this on 2.1.11

          Show
          Manfred Riem added a comment - Using the attached example I am unable to reproduce this on 2.1.11
          Hide
          Mathias Werlitz added a comment -

          Yes, it seems this issue has been fixed with 2.1.11.

          Show
          Mathias Werlitz added a comment - Yes, it seems this issue has been fixed with 2.1.11.

            People

            • Assignee:
              Ed Burns
              Reporter:
              Mathias Werlitz
            • Votes:
              15 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: