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

        Brad Kroeger created issue -
        Hide
        Brad Kroeger added a comment -

        Composite Component for testing

        Show
        Brad Kroeger added a comment - Composite Component for testing
        Brad Kroeger made changes -
        Field Original Value New Value
        Attachment dataTable.xhtml [ 15587 ]
        Brad Kroeger made changes -
        Assignee Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Arturo Zambrano [ artzambrano ]
        Fix Version/s 3.4 [ 10770 ]
        Assignee Priority P1 [ 10010 ]
        Arran Mccullough made changes -
        Salesforce Case Reference 5007000000UaCTLAA3
        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.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37336 Thu Aug 08 10:35:56 MDT 2013 art.zambrano ICE-9079 fix to check if the table is in a composite component, if so, push the composite component to EL before starting the exporting operation
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/DataExporter.java
        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.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P01 [ 11174 ]
        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.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: