© 2014, Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and or/its affiliates and/or their licensors.
Generated by JsDoc Toolkit 2.3.2

Class Sample .view .MySample

Class Summary
Constructor AttributesConstructor Name and Description
 
Sample.view.MySample(selector, dataTable, config)

Constructor function that a custom view library must implement.

Method Summary
Method AttributesMethod Name and Description
<static>  
Sample.view.MySample.draw(dataTable, config)

Method that a custom view library must implement to render the custom view.

<static>  
Sample.view.MySample.getConfig()

Retrieves user entries in the custom configuration form, if any, for this view and populates properties in the configuration object for this view.

<static>  
Sample.view.MySample.showConfig(dataTable, selector, config)

Optional method that a custom view library can implement to render the configuration form for the plug-in to the Presto View Wizard when users create custom views based on this custom view library.

<static>  
Sample.view.MySample.update(dataTable, config)

Optional method that a custom view library can implement to handle updates from the Data Table or events and render a custom view.

<static>  
Sample.view.MySample.validate()

Validates user entries in the custom configuration form, if any, for this view and returns true or false.

Class Detail
Sample.view.MySample(selector, dataTable, config)

Constructor function that a custom view library must implement.

Parameters:
{String or Object} selector
A DOM node or CSS selector for the node where this view will be rendered.
{Object} dataTable
A Presto.DataTable instance with the data to render in this view. DataTables also contain data model metadata with methods to access both.
{Object} config
An optional configuration object fpr a specific view based on this custom view library and associated with a specific Presto mashable, mashup or App. This configuration object always includes configuration for the custom view library such as the title that displays in the View Gallery. Depending on where the custom view is instantiated, it may also contain the configuration for this specific view and Presto artifact.
Method Detail
<static> Sample.view.MySample.draw(dataTable, config)

Method that a custom view library must implement to render the custom view.

Parameters:
{Object} dataTable
A Presto.DataTable instance with the data to render in this view. DataTables also contain the data model metadata with methods to access both.
{Object} config
An optional configuration object fpr a specific view based on this custom view library and associated with a specific Presto mashable, mashup or App. This configuration object always includes configuration for the custom view library such as the title that displays in the View Gallery. Depending on where the custom view is instantiated, it may also contain the configuration for this specific view and Presto artifact.
<static> Sample.view.MySample.getConfig()

Retrieves user entries in the custom configuration form, if any, for this view and populates properties in the configuration object for this view. See #.showConfig and #.validate for more information.

<static> Sample.view.MySample.showConfig(dataTable, selector, config)

Optional method that a custom view library can implement to render the configuration form for the plug-in to the Presto View Wizard when users create custom views based on this custom view library. If omitted, the Presto View Wizard assumes no view-specific configuration is required other than the base configuration supported by the wizard.

For custom views, the Presto View Wizard automatically provides three base steps to users plus a custom step specific to the custom view library:

  1. Base step: data configuration step that allows users to delete or reorder columns, provide data type information or set other generic configuration for each column in the data model of the Presto.DataTable for this view.
  2. Optional custom step: to provide specific configuration for this view to the custom view library.
  3. Base step: preview of the view based on the previous data configuration and optional view configuration steps.
  4. Base step: final step to name and save the view for this artifact.

This method handles rendering the optional form to provide specific view configuration (step 2) for this custom view library. See also #.validate and #.getConfig for methods involved in configuration for a custom view.

Parameters:
{Object} dataTable
A Presto.DataTable instance with the data to render in this view. DataTables also contain the data model metadata with methods to access both.
{String or Object} selector
The CSS selector or DOM node where this form will be rendered.
{Object} config
An optional configuration object this view with configuration information for the custom view library and any existing configuration for this view. This includes:
  • columns: an array of objects, one for each column from the dataset for this mashable or mashup that the user has included from the Data Configuration step in the View Wizard. Each column object contains:

    • name: column name
    • header: user-assigned title
    • datatype: user-assigned format
    • template: user-assigned template
    • arrowFormat, colorFormat and NumberFormat objects if the user has assigned a formatter
  • Properties for each field in the custom view configuration form, if this is an existing view. The specific property names and contents are defined in the getConfig method.

?document other properties? record? name, description, lib, view-type?
<static> Sample.view.MySample.update(dataTable, config)

Optional method that a custom view library can implement to handle updates from the Data Table or events and render a custom view. For example, this can be used to handle partial updates rather than a complete rerendering.

If omitted from a custom view class, Presto calls the draw method instead.

Parameters:
{Object} dataTable
A Presto.DataTable instance with the data to render in this view from the mashable or mashup the view is associated with. DataTables also contain the data model metadata with methods to access both.
{Object} config
An optional configuration object fpr a specific view based on this custom view library and associated with a specific Presto mashable, mashup or App. This configuration object always includes configuration for the custom view library such as the title that displays in the View Gallery. Depending on where the custom view is instantiated, it may also contain the configuration for this specific view and Presto artifact.
<static> Sample.view.MySample.validate()

Validates user entries in the custom configuration form, if any, for this view and returns true or false. See also #.showConfig and #.getConfig for more information.