ICEfaces
  1. ICEfaces
  2. ICE-9079

ace:dataExporter Composite Component Backing Bean Attribute Issue

    Details

    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      When using the attached dataTable composite component, the ace:dataExporter will not generate the table contents. I have isolated this as being the result of passing the backing bean in as an attribute. If you remove the backing bean attribute and have the el expressions directly reference a backing bean, this is not an issue.

      To reproduce this issue:

      - Add the attached composite component to the showcase (drop in webapp/resources/components)
      - In dataExporter.xhtml add the namespace xmlns:test="http://java.sun.com/jsf/composite/components"
      - Change the target attribute of ace:dataExporter to target=":form2:test:carTable"
      - replace the ace:dataTable tags with <test:dataTable id="test" bean="#{dataTableLazyLoading}"> (leave the dataTable content in place)



        Activity

        Hide
        Brad Kroeger added a comment -

        Composite Component for testing

        Show
        Brad Kroeger added a comment - Composite Component for testing
        Hide
        Arturo Zambrano added a comment -

        The problem is not specifically with the ace:dataExporter code. What happens is that when using the cc.attrs.bean expression, the table contains no rows at the moment the export operation is made. Adding a System.out.println in the Exporter class reveals that calling table.getRowCount() returns 0. I tried changing the phase at which the export operation occurs (normally INVOKE_APPLICATION), but that didn't help. When using RESTORE_VIEW and RENDER_RESPONSE no file was produced, and when using the other phases, the table had 0 rows. At the moment it's still unclear why this happens, but it seems to be a more general issue with the cc.attrs.bean expression.

        Show
        Arturo Zambrano added a comment - The problem is not specifically with the ace:dataExporter code. What happens is that when using the cc.attrs.bean expression, the table contains no rows at the moment the export operation is made. Adding a System.out.println in the Exporter class reveals that calling table.getRowCount() returns 0. I tried changing the phase at which the export operation occurs (normally INVOKE_APPLICATION), but that didn't help. When using RESTORE_VIEW and RENDER_RESPONSE no file was produced, and when using the other phases, the table had 0 rows. At the moment it's still unclear why this happens, but it seems to be a more general issue with the cc.attrs.bean expression.
        Hide
        Arturo Zambrano added a comment -

        Committed fix to revision 37336. The fix consists in checking if the table is in a composite component, if so, we push the composite component to EL before we start exporting the data.

        Show
        Arturo Zambrano added a comment - Committed fix to revision 37336. The fix consists in checking if the table is in a composite component, if so, we push the composite component to EL before we start exporting the data.
        Hide
        Ken Fyten added a comment -

        Re-open to add the EE 3.3.0.GA_P01 fix target.

        Show
        Ken Fyten added a comment - Re-open to add the EE 3.3.0.GA_P01 fix target.
        Hide
        Arturo Zambrano added a comment -

        Committed fix to p01 tag at revision 37373.

        Show
        Arturo Zambrano added a comment - Committed fix to p01 tag at revision 37373.
        Hide
        Alex Vlad added a comment -

        Is this fix going to help also in case under an ace:column I have a custom composite which only contains a "h:outputText" element?

        e.g
        <ace:dataTable id="table" value="#

        {backingBean.dataModel}

        " var="myModel" selectionMode="single">
        <ace:column id="name" headerText="name">
        <cc:compositeComponent id="myComposite"/>
        </ace:column>
        </ace:dataTable>

        ---------------------------------------------
        <cc:implementation>
        <h:outputText id="testOutput" value="myTest"/>
        </cc:implementation>

        What I expect to see in the export file is myTest for each row of the datatable.
        Thanks in advance.

        Show
        Alex Vlad added a comment - Is this fix going to help also in case under an ace:column I have a custom composite which only contains a "h:outputText" element? e.g <ace:dataTable id="table" value="# {backingBean.dataModel} " var="myModel" selectionMode="single"> <ace:column id="name" headerText="name"> <cc:compositeComponent id="myComposite"/> </ace:column> </ace:dataTable> --------------------------------------------- <cc:implementation> <h:outputText id="testOutput" value="myTest"/> </cc:implementation> What I expect to see in the export file is myTest for each row of the datatable. Thanks in advance.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: