ICEfaces
  1. ICEfaces
  2. ICE-8903

MyFaces + Showcase : h:inputText in ace:cellEditor decoded, but value was not submitted

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2, 4.0.BETA
    • Fix Version/s: EE-3.3.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      IF 3.x
    • Assignee Priority:
      P3

      Description

      When running the showcase with MyFaces, the RowState ace:dataTable example produces the following bug on row selection:

      DataTable - Row state:
      15-Jan-2013 12:42:26 PM org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils decodeUIInput
      WARNING: There should always be a submitted value for an input if it is rendered
      , its form is submitted, and it was not originally rendered disabled or read-only. You cannot submit a form after disabling an input element via javascript. Consider setting read-only to true instead or resetting the disabled value back to false prior to form submission. Component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /showcase.xhtml][Class: javax.faces.component.html.HtmlBody,Id: __7][Class: javax.faces.component.html.HtmlPanelGroup,Id: __o][Class: javax.faces.component.html.HtmlPanelGroup,Id: __p][Class: javax.faces.component.html.HtmlPanelGroup,Id: __1b][Class: org.icefaces.ace.component.panel.Panel,Id: examplePanel][Class:javax.faces.component.html.HtmlPanelGroup,Id: __1e_6][Class: javax.faces.component.html.HtmlForm,Id: form][Class: org.icefaces.ace.component.datatable.DataTable,Id: carTableRowExpansion][Class: org.icefaces.ace.component.column.Column,Id: cost][Class:org.icefaces.ace.component.celleditor.CellEditor,Id: j_id_1e_29][Class: javax.faces.component.html.HtmlInputText,Id: costInput]}

      The input components inside the cellEditors are being decoded (since the selection request was called via ace:ajax render/execute @this where @this is the table), however this request didn't submit the values of those fields to the server.

      This would appear to be a bridge or MyFaces shortcoming as I'd expect the submission of the ace:dataTable to include the values of all child inputs.

        Issue Links

          Activity

          Hide
          Nils Lundquist added a comment -

          Assigning to Ken for delegation.

          Show
          Nils Lundquist added a comment - Assigning to Ken for delegation.
          Hide
          Mircea Toma added a comment -

          I believe ace:cellEditor component is the one not respecting the JSF contracts. When the row is selected (and not in edit mode) the input elements used to edit the cells are not rendered. The problem is that the decision to render them is not based on isRendered() component state. So when the row is only selected the submit will not include the cell input values because they are not rendered but the server side sees them as rendered during processDecode phase (because the render state of the input elements is "true").

          Show
          Mircea Toma added a comment - I believe ace:cellEditor component is the one not respecting the JSF contracts. When the row is selected (and not in edit mode) the input elements used to edit the cells are not rendered. The problem is that the decision to render them is not based on isRendered() component state. So when the row is only selected the submit will not include the cell input values because they are not rendered but the server side sees them as rendered during processDecode phase (because the render state of the input elements is "true").
          Hide
          Mircea Toma added a comment -

          Modified cell editor's processDecodes method to modify the render state of the "input" facet based on the edit mode of the row state. Also modified RowState to change the render state of the cells when they are added or removed from the list of edited cells.

          Show
          Mircea Toma added a comment - Modified cell editor's processDecodes method to modify the render state of the "input" facet based on the edit mode of the row state. Also modified RowState to change the render state of the cells when they are added or removed from the list of edited cells.
          Hide
          Cruz Miraback added a comment -

          Confirmed fixed using ICEfaces EE 3.2.0.GA.Build13 on Tomcat7 in Firefox18.

          Show
          Cruz Miraback added a comment - Confirmed fixed using ICEfaces EE 3.2.0.GA.Build13 on Tomcat7 in Firefox18.
          Hide
          Cruz Miraback added a comment -

          Re-opening because one of the issues that this JIRA fixed started to occur again. See ICE-8962 for specific details.

          Show
          Cruz Miraback added a comment - Re-opening because one of the issues that this JIRA fixed started to occur again. See ICE-8962 for specific details.
          Hide
          Mircea Toma added a comment -

          The ICE-8962 regression is absolutely unrelated to this issue. Resolving this one but reopening ICE-8962.

          Show
          Mircea Toma added a comment - The ICE-8962 regression is absolutely unrelated to this issue. Resolving this one but reopening ICE-8962 .
          Hide
          Nils Lundquist added a comment -

          This issue is known, but cannot be worked around without the cooperation of the MyFaces team or extensive hacking of the CellEditor visiting.

          The 'rendered' property of components is not state saved correctly in iterative cases. Without proper 'rendered' state MyFaces will continuously complain about the the lack of input for components inside an conditionally excluded input facet.

          Show
          Nils Lundquist added a comment - This issue is known, but cannot be worked around without the cooperation of the MyFaces team or extensive hacking of the CellEditor visiting. The 'rendered' property of components is not state saved correctly in iterative cases. Without proper 'rendered' state MyFaces will continuously complain about the the lack of input for components inside an conditionally excluded input facet.
          Hide
          Nils Lundquist added a comment -

          Revision #36342
          Committed by nils.lundquist
          A minute ago
          ICE-8903 - CellEditor decode temporarily alters facet rendered state to avoid MyFaces warning about lack of input for conditonally unrendered facets. Programmatic conditional rendering within a UIData may not use the rendered attribute permanently due to it not being state saved iteratively.

          This change avoids the warning, but doesn't change the input processing greatly. Hopefully it avoids whatever this warning was attempting to have us avoid.

          Show
          Nils Lundquist added a comment - Revision #36342 Committed by nils.lundquist A minute ago ICE-8903 - CellEditor decode temporarily alters facet rendered state to avoid MyFaces warning about lack of input for conditonally unrendered facets. Programmatic conditional rendering within a UIData may not use the rendered attribute permanently due to it not being state saved iteratively. This change avoids the warning, but doesn't change the input processing greatly. Hopefully it avoids whatever this warning was attempting to have us avoid.

            People

            • Assignee:
              Nils Lundquist
              Reporter:
              Nils Lundquist
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: