ICEfaces
  1. ICEfaces
  2. ICE-7697

Remove ace:dataExporter compile-time dependency on iText library

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.RC2
    • Fix Version/s: 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 3
    • Assignee Priority:
      P1
    • Affects:
      Compatibility/Configuration

      Description

      In order to remove the requirement to distribute the iText library /.jar with ICEfaces bundles, including src bundles, we need to refactor the ace:dataExporter PDF export feature to use reflective techniques to find, load, and access the iText library classes it requires. Doing so will avoid java compilation errors that would otherwise occur when building the ace:dataExporter component without the iText jar on the class path.

      A good reference example of this technique is the icesoft/compat/core/src/main/java/com/icesoft/util/SeamUtilities.java class, which uses reflection extensively.

      In addition, we should also add some nice logging so that if the PDF export is executed at runtime, and the iText library is not present on the classpath, it logs an error explaining the problem to the server console, and possibly also populates the ace:dataExporter message(s) with a nice user facing error, such as "PDF Export not available at this time. Contact your System Administrator." Under no circumstances do we want the application state to be corrupted or otherwise fouled.




        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 3.0 [ 10241 ]
        Affects [Compatibility/Configuration]
        Assignee Priority P1
        Assignee Arturo Zambrano [ artzambrano ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27421 Thu Jan 26 15:18:04 MST 2012 art.zambrano ICE-7697 removed compile-time dependency on iText library by using reflection to generate PDF file
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/PDFExporter.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/dataexporter/dataexporter.js
        Hide
        Arturo Zambrano added a comment -

        Fixed at revision 27421.

        If the iText library is not present, a SEVERE log message will be displayed in the console and no resource will be created. In the client side nothing will happen, except in IE7, which uses a different file-delivery mechanism, where a brief message will appear in the popup window, saying that the format is not supported.

        Show
        Arturo Zambrano added a comment - Fixed at revision 27421. If the iText library is not present, a SEVERE log message will be displayed in the console and no resource will be created. In the client side nothing will happen, except in IE7, which uses a different file-delivery mechanism, where a brief message will appear in the popup window, saying that the format is not supported.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27431 Thu Jan 26 17:58:50 MST 2012 ken.fyten ICE-7697 removed compile-time dependency on iText library by using reflection to generate PDF file.
        Files Changed
        Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/ace/component/resources/icefaces.ace/dataexporter/dataexporter.js
        Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/PDFExporter.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: