ICEfaces
  1. ICEfaces
  2. ICE-11164

ace:dataExporter, content of components that perform iteration is not exported

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.1.0.GA, EE-3.3.0.GA_P04
    • Fix Version/s: 4.3, EE-3.3.0.GA_P06
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Support Case References:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      The workaround consists of, instead of using an iterative component, simply using an h:outputText component and build a string based on the List that would've been used in ui:repeat, concatenating all item values in the List and adding necessary formatting, like commas. This h:outputText component would only be rendered when performing the export operation (i.e. having a boolean property bound to its 'rendered' attribute that returns true only when the current phase is the Invoke Application phase).
      Show
      The workaround consists of, instead of using an iterative component, simply using an h:outputText component and build a string based on the List that would've been used in ui:repeat, concatenating all item values in the List and adding necessary formatting, like commas. This h:outputText component would only be rendered when performing the export operation (i.e. having a boolean property bound to its 'rendered' attribute that returns true only when the current phase is the Invoke Application phase).

      Description

      Iterative components like ui:repeat, icecore:repeat, ace:list and any other component that performs iteration don't get to be exported by ace:dataExporter. This is because, when exporting, the components aren't really processed in the same way as when they're rendered. The export operation occurs in the Invoke Application phase, and the component values are extracted by different means, depending on the general type of the component. An UIData component just won't go through the full iteration process at this stage, initiated by the ace:dataExporter component. Perhaps we could consider adding some special processing for UIData components in ace:dataExporter to perform the full iteration process and extract the value at each row, and we just concatenate all the values.

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows this issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • The content in Column Three is not displayed.
        Show
        Arran Mccullough added a comment - Attached test case that shows this issue. Steps: Load welcomeICEfaces.jsf The content in Column Three is not displayed.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case13902Example.war [ 22345 ]
        Attachment Case13902Example.zip [ 22346 ]
        Arturo Zambrano made changes -
        Summary ace:dataTable - Content not rendered when using c:forEach in ace:column ace:dataExporter, content of components that perform iteration is not exported
        Arturo Zambrano made changes -
        Description When using a c:forEach to render content in a cell, the content isn't rendered in the call. If a ui:repeat is used, the data is shown.

        This issue was found after trying the workaround for ICE-9474. The customer is trying to export content via the ace:dataExporter. Using the workaround, it doesn't show the data on the screen or in the export. With a ui:repeat tag, it does show on the screen but not in the export.
        Iterative components like ui:repeat, icecore:repeat, ace:list and any other component that performs iteration don't get to be exported by ace:dataExporter. This is because, when exporting, the components aren't really processed in the same way as when they're rendered. The export operation occurs in the Invoke Application phase, and the component values are extracted by different means, depending on the general type of the component. An UIData component just won't go through the full iteration process at this stage, initiated by the ace:dataExporter component. Perhaps we could consider adding some special processing for UIData components in ace:dataExporter to perform the full iteration process and extract the value at each row, and we just concatenate all the values.
        Arturo Zambrano made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Arturo Zambrano made changes -
        Workaround Description The workaround consists of, instead of using an iteration component, simply using an h:outputText component and build a string based on the List that would've been used in ui:repeat, concatenating all item values in the List and adding necessary formatting, like commas. This h:outputText component would only be rendered when performing the export operation (i.e. having a boolean property bound to its 'rendered' attribute that returns true only when the current phase is the Invoke Application phase).
        Workaround Exists Yes [ 10007 ]
        Arturo Zambrano made changes -
        Workaround Description The workaround consists of, instead of using an iteration component, simply using an h:outputText component and build a string based on the List that would've been used in ui:repeat, concatenating all item values in the List and adding necessary formatting, like commas. This h:outputText component would only be rendered when performing the export operation (i.e. having a boolean property bound to its 'rendered' attribute that returns true only when the current phase is the Invoke Application phase). The workaround consists of, instead of using an iterative component, simply using an h:outputText component and build a string based on the List that would've been used in ui:repeat, concatenating all item values in the List and adding necessary formatting, like commas. This h:outputText component would only be rendered when performing the export operation (i.e. having a boolean property bound to its 'rendered' attribute that returns true only when the current phase is the Invoke Application phase).
        Ken Fyten made changes -
        Fix Version/s 4.3 [ 13096 ]
        Hide
        Arturo Zambrano added a comment -

        r52052: added support for exporting ace:dataTable, ace:list, icecore:repeat and UIData descendants in general

        It's not possible to support exporting ui:repeat because it's not a component but a tag handler, and all the exporting logic is based on actual components. Instead, icecore:repeat can be used.

        Show
        Arturo Zambrano added a comment - r52052: added support for exporting ace:dataTable, ace:list, icecore:repeat and UIData descendants in general It's not possible to support exporting ui:repeat because it's not a component but a tag handler, and all the exporting logic is based on actual components. Instead, icecore:repeat can be used.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52052 Thu Nov 02 11:23:17 MDT 2017 art.zambrano ICE-11164 added support for exporting ace:dataTable, ace:list, icecore:repeat and UIData descendants in general
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/Exporter.java
        Hide
        Arturo Zambrano added a comment -

        This is failing on Wildfly12.

        Show
        Arturo Zambrano added a comment - This is failing on Wildfly12.
        Arturo Zambrano made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52489 Thu Jun 21 15:00:10 MDT 2018 art.zambrano ICE-11164 added support for exporting nested ace:list components based on SelectItem models
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/Exporter.java
        Hide
        Arturo Zambrano added a comment -

        r52489: added support for exporting nested ace:list components based on SelectItem models

        The previous code assumed that only composite lists would be exported. The new test app revealed the lack of support for SelectItem models in ace:list when exporting them nested in other components that perform iteration.

        This issue wasn't exclusive to Wildfly.

        Show
        Arturo Zambrano added a comment - r52489: added support for exporting nested ace:list components based on SelectItem models The previous code assumed that only composite lists would be exported. The new test app revealed the lack of support for SelectItem models in ace:list when exporting them nested in other components that perform iteration. This issue wasn't exclusive to Wildfly.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ken Fyten added a comment -

        Re-opened to backport this fix for EE 3.3.

        Show
        Ken Fyten added a comment - Re-opened to backport this fix for EE 3.3.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P06 [ 13114 ]
        Hide
        Arturo Zambrano added a comment -

        This issue is failing on MyFaces. A 'java.io.IOException' error message pops up in the browser window.

        Show
        Arturo Zambrano added a comment - This issue is failing on MyFaces. A 'java.io.IOException' error message pops up in the browser window.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52506 Wed Jul 04 17:21:09 MDT 2018 art.zambrano ICE-11164 added null checks before removing the row var from the request map; added some more exception handling code
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/PDFExporter.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/Exporter.java
        Hide
        Arturo Zambrano added a comment -

        r52506: added null checks before removing the row var from the request map; added some more exception handling code

        Myfaces was throwing an exception from removing null from the request map. This fix avoids that.

        Show
        Arturo Zambrano added a comment - r52506: added null checks before removing the row var from the request map; added some more exception handling code Myfaces was throwing an exception from removing null from the request map. This fix avoids that.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Arturo Zambrano added a comment -

        r52507: backported fixes to the EE 3.3 maintenance branch

        Show
        Arturo Zambrano added a comment - r52507: backported fixes to the EE 3.3 maintenance branch
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: