ScheduleExporter

Version 1 by Arturo Zambrano
on May 02, 2017 12:47.


 
compared with
Current by Arturo Zambrano
on May 02, 2017 13:15.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

  h2. Overview
 _Since 4.2 EE_
  
 The _ace:scheduleExporter_ component is a utility to export event data from an ace:schedule component as an Excel, PDF, XML or CSV document. This component renders an HTML button. More components and HTML elements can be nested inside this tag to give a different look to the button..
  
 {tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=ace:scheduleExporter] of this component, complete with source code.{tip}
  
  
 h2. Getting Started
  
 In most cases, it's enough to add the tag on the page without any configuration.
  
 {panel}
 {code:xml|borderStyle=dashed}<html ... xmlns:ace="http://www.icefaces.org/icefaces/components">
 <h:body>
  <h:form>
  <ace:schedule id="mySchedule" ... />
  <ace:scheduleExporter
  label="Export File"
  type="csv"
  target="mySchedule"
  fileName="events"/>
  </h:form>
 </h:body>
 </html>
 {code}
 {panel}
  
 h2. Attributes
  
 {tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://res.icesoft.org/docs/v4_latest/ace/tld/ace/scheduleExporter.html].{tip}
 {panel}
 *target:* Define the id of the ace:schedule component whose data will be exported.
 {panel}
 {panel}
 *type:* Define the format of file export. Available formats: "xls", "xlsx", "pdf", "csv", and "xml".
 {panel}
 {panel}
 *fileName:* Define the filename of the generated file, defaults to the target id.
 {panel}
 {panel}
 *label:* Define the text that will appear on the button to trigger the export. Default value is 'Export'. This attribute applies only if the component has no children.
 {panel}
 {panel}
 *fieldsToExport:* Specifies the event fields to include when exporting as well as the order of those fields. The fields that can be specified are 'title', 'startdate', 'enddate', 'location', 'notes', 'id' and 'styleclass'. The field names are case insensitive and must be separated by commas. Spaces are ignored.
 {panel}
 {panel}
 *sortBy:* Specifies the name of the field by which to sort events when exporting. The fields that can be specified are 'title', 'startdate', 'enddate', 'location', 'notes', 'id' and 'styleclass'. The field names are case insensitive.
 {panel}
  
 h2. Client Behavior Events
  
 | action | Triggers when the button is clicked or pressed by any other means. By default, both this ace:scheduleExporter component and the target ace:schedule component are executed in this ajax request. |
  
 h2. Javascript API
  
 h4. ICEfaces 4+
  
 The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use.
  
 {code}var widget = ice.ace.instance('frm:componentId);{code}
  
 {tip}The _ice.ace.instance_ function requires the _full_ client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use {{prependId="false"}} in the enclosing form (e.g. _<h:form prependId="false">_).{tip}
  
 {info}This component doesn't have a client-side API made specifically to be used by application developers. However, the component's internal methods and variables can be accessed in this way, including the underlying jQuery object and objects from underlying Javascript libraries (if applicable), and can be used for whatever purpose a developer might have in mind.
 {info}
  
 h2. Keyboard and ARIA Support
  
 Not supported at the moment.
  
 h2. Known Issues
  
 None at the moment.

© Copyright 2018 ICEsoft Technologies Canada Corp.