ICEfaces
  1. ICEfaces
  2. ICE-8522

ace:dataExporter, support pluggable export adapters for different export data-types

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any

      Description

      Add an attribute to ace:dataExporter that allows application developers to specify a custom exporter type to be used instead of the built-in supported formats. Such object must be a subclass of org.icefaces.ace.component.dataexporter.Exporter.

        Activity

        Hide
        Arturo Zambrano added a comment -

        Committed improvement at revision 30649 in the trunk.

        Note: since the ace:dataExporter component has always worked by creating a new instance of a specific exporter type, the best practice for a custom exporter is to return a new instance of the exporter in the getter method, e.g.:

        public Object getCustomExporter()

        { return new MyExporter(); }

        Since, this getter is called in the Invoke Application phase, the exporter instance can pass any other application data in the constructor of the custom exporter, e.g.:

        public Object getCustomExporter()

        { return new MyExporter(selectedItems); }
        Show
        Arturo Zambrano added a comment - Committed improvement at revision 30649 in the trunk. Note: since the ace:dataExporter component has always worked by creating a new instance of a specific exporter type, the best practice for a custom exporter is to return a new instance of the exporter in the getter method, e.g.: public Object getCustomExporter() { return new MyExporter(); } Since, this getter is called in the Invoke Application phase, the exporter instance can pass any other application data in the constructor of the custom exporter, e.g.: public Object getCustomExporter() { return new MyExporter(selectedItems); }
        Hide
        Arturo Zambrano added a comment - - edited

        Committed change to the trunk at revision 31346. The 'exporter' method signature was modified to avoid having to pass in every configuration parameter when invoking the exporter. Instead the ace:dataExporter component itself will be passed in, and the Exporter instance will retrieve whatever information it needs from the component. This is to facilitate the use of custom exporters in the future.

        Show
        Arturo Zambrano added a comment - - edited Committed change to the trunk at revision 31346. The 'exporter' method signature was modified to avoid having to pass in every configuration parameter when invoking the exporter. Instead the ace:dataExporter component itself will be passed in, and the Exporter instance will retrieve whatever information it needs from the component. This is to facilitate the use of custom exporters in the future.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: