Skip to content
Reference > Classes

TreePanel

Definition

TreePanel var = .... ;

Extends

Extended By

None

Description

Panel for Tree Visualization.

Method Summary

Owner Name Return Type Description
TreePanel addColumn(columnId, columnType, formula, position) Object Creates a tree column using the provided information. Valid column types are: text, numeric, progress, time, date, price, percent, html, json, image, checkbox, Masked, spark, time_sec,time_millis, time_micros, time_nanos, datetime, datetime_sec, datetime_millis, datetime_micros, datetime_nanos
TreePanel addColumn(columnId, columnType, formula, position, orderBy, style, color, bgColor, decimals, headerStyle) Object Creates a tree column using the provided information. Valid column types are: text, numeric, progress, time, date, price, percent, html, json, image, checkbox, Masked, spark, time_sec,time_millis, time_micros, time_nanos, datetime, datetime_sec, datetime_millis, datetime_micros, datetime_nanos
TreePanel addGrouping(grouping, display, parentFormula) Boolean adds a new grouping column at the innermost level.
TreePanel addGroupingAt(grouping, display, parentFormula, position) Boolean adds a new grouping column at the given position.
Panel addPanelNextToMe(position, configuration) DividerPanel Adds a new panel adjacent to this panel by creating a divider portlet. The divider portlet is returned.
TreePanel asFormattedTable() Table Copies and returns the values of this panel as a Table, with cells formatted.
TreePanel asFormattedTable(selectedRows, unselectedRows, filteredRows, visibleColumns, hiddenColumns) Table Copies and returns the values of this panel as a Table, with cells formatted.
TreePanel asFormattedTable(selectedRows, unselectedRows, filteredRows, visibleColumns, hiddenColumns, columns) Table Copy and return the values in the specified columns of this panel as a Table, with cells formatted
TreePanel asTable() Table Copies and returns the values of this panel as a Table.
TreePanel asTable(selectedRows, unselectedRows, filteredRows, visibleColumns, hiddenColumns) Table Copies and returns the values of this panel as a Table with more options.
TreePanel asTable(selectedRows, unselectedRows, filteredRows, visibleColumns, hiddenColumns, columns) Table Copies and returns the values in the selected columns of this panel as a Table with more options.
TreePanel asTable(options, columns) Table Copies and returns the values in the specified columns of this panel as a Table with options.
Panel bringToFront() Object Makes this panel visible and bring its containing window to the front.
Panel callCommand(applicationId, cmdId, arguments) String Calls the given command. Returns commandUid (String) on success, otherwise null.
Panel callCommand(applicationId, cmdId, arguments) String Calls the given command. Returns the commandUid (String) for this command call or null on failure.
Panel callRelationship(relationshipName) Boolean Reruns the relationship targeting this panel based on name. Returns true on success.
Panel callRelationshipId(relationshipId) Boolean Reruns the relationship targeting this panel based on id. Returns true on success.
TreePanel clearFilter(columnName) Boolean Clears the filter on the column specified by columnName. Returns true if successful, false otherwise.
TreePanel clearSelectedRows() Boolean De-selects all the selected rows. Always succeeds.
TreePanel clearSort(columnName) Boolean Clears the sort on the specified column name. Returns true on success, false on invalid column name.
Panel clearUserSelection() Object Clears the user's selection.
Panel close() Object Removes this transient panel. Note this will throw an error if the target panel is not transient.
Panel deletePanel() Object Removes this transient panel. Note this will throw an error if the target panel is not transient
TreePanel expandSelectedNodes(isSetExpanded, isRecursive) Boolean expand or collapse the selected nodes either recursively or non-recursively
Panel exportConfig() Map Exports this panel's configuration to a map.
Panel exportConfig(includeRelationships, includeDatamodels) Map Exports this panel's configuration to a map, with the options to include external relationships and external datamodels.
Panel exportConfigIncludeExternalRelationships() Map Exports this panels configuration with external relationships
Panel exportUserPreferences() Map Exports this panel's user preferences to a map.
DashboardResource getCallback(callbackName) Callback Returns a callback by name
DashboardResource getCallbacks() Map Returns a map of all callback definitions.
DashboardResource getChildren() List Returns a list of the child dashboard resources.
Object getClassName() String Returns the string name of this object's class type.
TreePanel getColumn(columnName) TreePanelColumn Returns the column using the provided column name.
TreePanel getColumnById(columnId) TreePanelColumn Returns the column using the provided column id.
TreePanel getColumnIds() Set returns a list of TreePanelColumn ids
TreePanel getColumnLocation(columnName) Integer Returns the zero-indexed left based position of the column, -1 if hidden, -2 if it doesn't exist.
TreePanel getColumnSorting(columnName) String Returns the sort, returns true=ascending, false=descending, null=no sort or column not found.
TreePanel getColumnsFilter() List Returns a list of filtered columns.
TreePanel getColumnsWithSort() List Return a list of the names of the columns that have sorts.
Panel getCurrentRelationship() Relationship Returns the Relationship object currently applied to this panel.
TreePanel getCurrentWhere() String Returns the currently applied filter.
DashboardResource getDRI() String Returns the Dashboard Resource Indicator (DRI) as a string. DRI is the unique identifier of this resources within the entire dashboard.
DashboardResource getDashboardResourceType() String Returns the Dashboard Resource Type as a string
Panel getDatamodels() Object Returns a set of datamodels that were used in this panel.
TreePanel getDefaultWhere() String Returns the default filter value.
Panel getDownstreamMode() String Returns status of send data downstream to realtime panels. The statuses are OFF or SELECTED_OR_ALL.
DashboardResource getFormula(formulaName) Formula Returns a Formula given the formula name.
DashboardResource getFormulaNames() Set Returns a set of the names of all formulas for this object.
DashboardResource getFormulas() Map Returns a map of all available formulas for this object. The key is the formula name.
TreePanel getGrouping(groupingId) TreePanelGrouping Returns the grouping using the provided id.
TreePanel getGroupings() List returns a list of TreePanelGrouping objects.
TreePanel getHiddenColumnsCount() Integer Returns the number of columns hidden from the panel.
Panel getId() String Returns this panel's ID (as defined in settings).
DashboardResource getLRI() String Returns the Localized Resource Indicator (LRI) as a string. LRI is the unique identifier of this resource with the parent element.
Panel getLayout() Layout Returns layout that owns this panel.
Panel getLocation() Rectangle Returns a Rectangle object that stores the location of this panel relative to the upper left corner of the browser, not including the 3Forge header.
Panel getMenu() MenuItem Returns this panel's root custom context menu.
DashboardResource getOwner() DashboardResource Returns the DashboardResource that owns this object.
Panel getParent() Panel Returns the parent panel of this panel.
TreePanel getRows() List Returns a list of all rows from the Panel.
TreePanel getSearch() String Returns the last keyword(s) used to search the tree panel.
TreePanel getSelectedRows() List Returns a list of selected rows. Empty collection if no selection is made.
Panel getStyle(styleKey) String Returns the value for a particular style given the style code, which can be obtained by clicking on the style name. Returns Null if key not found.
Panel getStyle(styleKey, index) String Returns the value for a particular style given the style code at the specified position. The style code can be obtained by clicking on the style name. Returns Null if key not found, returns the first value in the list if position is out of bound.
Panel getStyleNumber(styleKey) Number Returns the numeric value associated with the supplied style key in this portlets style. Null if key not found, or value is not a number. Ex: using this method for text align will return null as its values are not numeric.
Panel getStyleSet() StyleSet Returns the StyleSet for this panel.
Panel getTitle() String Returns this panel's title
Panel getType() String Returns the type of this panel, either: html, div_v, div_h, tabs, or one of the AMI visualization types.
Panel getUid() String Returns this panel's ami-generated ID.
Panel getValue(key) Object Returns the value associated with key from this portlet's attributes. Returns null if key does not exist.
TreePanel getVisibleColumnsCount() Integer Returns the number of columns visible on the panel.
Panel getWindow() Window Returns the window that owns this panel.
TreePanel hideColumn(positionalColumnId) Boolean Hides a column specified by positionalColumnId. Returns false on invalid positional column id, true if operation is successful.
TreePanel hideColumn(columnName) Boolean Hides a column specified by columnName. Returns false on invalid columnName, true if operation is successful.
TreePanel hideColumnById(columnId) Boolean Hides a column specified by the columnId. Returns false on invalid columnId, true if operation is successful.
DashboardResource invokeCallback(callbackName, args) Object Executes the specified callback definition and returns the result from the callback.
Panel isPoppedOut() Boolean Returns true if this panel is popped out.
DashboardResource isTransient() Boolean Returns true if this is transient, false otherwise. Transient objects are not saved to the layout.
Panel isUndocked() Boolean Returns true if this panel is undocked.
Panel isVisible() Boolean Returns true if this panel is visible.
Panel minimize() Object Minimizes the window, same as calling getWindow().minimize().
TreePanel moveColumnsTo(pos, columnNames) Object Moves a list of columns to a particular position in the table, or hide them.
TreePanel removeColumn(id) Boolean Removes the specified treepanel column
TreePanel removeGrouping(groupingId) Boolean removes an existing grouping by the id. To find the group id use TreePanel:: getGroupings() and TreePanelGrouping::getId().
TreePanel removeGroupingAt(position) Boolean removes an existing grouping column by it's index.
TreePanel resetWhere() Boolean Resets the current where filter to the default.
TreePanel selectRows(selectedRowsText) Boolean Overrides the currently selected rows with the supplied range of rows. If there is no currently selected rows, this method simply sets selected rows. Otherwise this will de-selected any previously selected rows then sets selected rows.
TreePanel setCurrentWhere(booleanExpression) Boolean Applies a filter on the underlying data for this table panel. If the filter is null or an empty string then no filter is applied and all data is shown.
Panel setDownstreamMode(mode) String Sets and returns the mode for sending data downstream to realtime panels. The modes are OFF or SELECTED_OR_ALL.
TreePanel setSearch(searchText) Boolean Searches the Tree Panel with keyword specified by searchText. Empty string or null clears the seach selection. Successful search selects the first matched row and consecutive matches can be found by pressing the enter key.
Panel setTitle(title) Boolean Sets the title of the panel with the given value
Panel setValue(key, value) Boolean Adds the key value pair to this portlet's attributes and return true if successful.
TreePanel sort(columnId, descending, keepSorting, add) Boolean Sorts the rows based on the column specified by columnId.
TreePanel sort(columnName, ascending, keepSorting, add) Boolean Sorts the rows based on the column specified by columnName.
Object toJson() String Returns a json representation of this object.

Method Definitions


addColumn(columnId,columnType,formula,position)

Object TreePanel::addColumn(String columnId, String columnType, String formula, Integer position)

Description

Creates a tree column using the provided information. Valid column types are: text, numeric, progress, time, date, price, percent, html, json, image, checkbox, Masked, spark, time_sec,time_millis, time_micros, time_nanos, datetime, datetime_sec, datetime_millis, datetime_micros, datetime_nanos

Parameter Definition

Name Type Description
columnId String  Column ID
columnType String  Type of column
formula String  Column Formula
position Integer  Position of the Column

addColumn(columnId,columnType,formula,position,orderBy,style,color,bgColor,decimals,headerStyle)

Object TreePanel::addColumn(String columnId, String columnType, String formula, Integer position, String orderBy, String style, String color, String bgColor, Integer decimals, String headerStyle)

Description

Creates a tree column using the provided information. Valid column types are: text, numeric, progress, time, date, price, percent, html, json, image, checkbox, Masked, spark, time_sec,time_millis, time_micros, time_nanos, datetime, datetime_sec, datetime_millis, datetime_micros, datetime_nanos

Parameter Definition

Name Type Description
columnId String  Column ID
columnType String  Type of column
formula String  Column Formula
position Integer  Position of the Column
orderBy String  Order By Formula
style String  Style to be applied
color String  Color to be applied
bgColor String  Background color to be applied
decimals Integer  Decimal Precision
headerStyle String  Header Style to be applied

addGrouping(grouping,display,parentFormula)

Boolean TreePanel::addGrouping(String grouping, String display, String parentFormula)

Description

adds a new grouping column at the innermost level.

Parameter Definition

Name Type Description
grouping String  A valid grouping name; can be a formula as well
display String  The optional display formula for the row
parentFormula String  The optional parent formula for recursive grouping

addGroupingAt(grouping,display,parentFormula,position)

Boolean TreePanel::addGroupingAt(String grouping, String display, String parentFormula, Integer position)

Description

adds a new grouping column at the given position.

Parameter Definition

Name Type Description
grouping String  A valid grouping name; can be a formula as well
display String  The optional display formula for the row
parentFormula String  The optional parent formula for recursive grouping
position Integer  Position to add the new grouping column (0 based position)

asFormattedTable()

Table TreePanel::asFormattedTable()

Description

Copies and returns the values of this panel as a Table, with cells formatted.


asFormattedTable(selectedRows,unselectedRows,filteredRows,visibleColumns,hiddenColumns)

Table TreePanel::asFormattedTable(Boolean selectedRows, Boolean unselectedRows, Boolean filteredRows, Boolean visibleColumns, Boolean hiddenColumns)

Description

Copies and returns the values of this panel as a Table, with cells formatted.

Parameter Definition

Name Type Description
selectedRows Boolean  Include selected Rows
unselectedRows Boolean  include unselected Rows
filteredRows Boolean  include filtered Rows
visibleColumns Boolean  include Visible Columns
hiddenColumns Boolean  Include Hidden Columns

asFormattedTable(selectedRows,unselectedRows,filteredRows,visibleColumns,hiddenColumns,columns)

Table TreePanel::asFormattedTable(Boolean selectedRows, Boolean unselectedRows, Boolean filteredRows, Boolean visibleColumns, Boolean hiddenColumns, Set columns)

Description

Copy and return the values in the specified columns of this panel as a Table, with cells formatted

Parameter Definition

Name Type Description
selectedRows Boolean  Include selected Rows
unselectedRows Boolean  include unselected Rows
filteredRows Boolean  include filtered Rows
visibleColumns Boolean  include Visible Columns
hiddenColumns Boolean  Include Hidden Columns
columns Set  Set of column names to include

asTable()

Table TreePanel::asTable()

Description

Copies and returns the values of this panel as a Table.


asTable(selectedRows,unselectedRows,filteredRows,visibleColumns,hiddenColumns)

Table TreePanel::asTable(Boolean selectedRows, Boolean unselectedRows, Boolean filteredRows, Boolean visibleColumns, Boolean hiddenColumns)

Description

Copies and returns the values of this panel as a Table with more options.

Parameter Definition

Name Type Description
selectedRows Boolean  Include selected Rows
unselectedRows Boolean  include unselected Rows
filteredRows Boolean  include filtered Rows
visibleColumns Boolean  include Visible Columns
hiddenColumns Boolean  Include Hidden Columns

asTable(selectedRows,unselectedRows,filteredRows,visibleColumns,hiddenColumns,columns)

Table TreePanel::asTable(Boolean selectedRows, Boolean unselectedRows, Boolean filteredRows, Boolean visibleColumns, Boolean hiddenColumns, Set columns)

Description

Copies and returns the values in the selected columns of this panel as a Table with more options.

Parameter Definition

Name Type Description
selectedRows Boolean  Include selected Rows
unselectedRows Boolean  include unselected Rows
filteredRows Boolean  include filtered Rows
visibleColumns Boolean  include Visible Columns
hiddenColumns Boolean  Include Hidden Columns
columns Set  Set of column names to include

asTable(options,columns)

Table TreePanel::asTable(String options, Set columns)

Description

Copies and returns the values in the specified columns of this panel as a Table with options.

Parameter Definition

Name Type Description
options String  A comma delimited combination of: SELECTED,UNSELECTED,FILTERED,VISIBLE,HIDDEN,FORMAT
columns Set  Set of column names to include, if null all columns are included

clearFilter(columnName)

Boolean TreePanel::clearFilter(String columnName)

Description

Clears the filter on the column specified by columnName. Returns true if successful, false otherwise.

Parameter Definition

Name Type Description
columnName String  column to clear filter on.

clearSelectedRows()

Boolean TreePanel::clearSelectedRows()

Description

De-selects all the selected rows. Always succeeds.


clearSort(columnName)

Boolean TreePanel::clearSort(String columnName)

Description

Clears the sort on the specified column name. Returns true on success, false on invalid column name.

Parameter Definition

Name Type Description
columnName String 

expandSelectedNodes(isSetExpanded,isRecursive)

Boolean TreePanel::expandSelectedNodes(Boolean isSetExpanded, Boolean isRecursive)

Description

expand or collapse the selected nodes either recursively or non-recursively

Parameter Definition

Name Type Description
isSetExpanded Boolean  if isSetExpanded is true, all selected tree nodes will be set expended. If false, they will be set collapsed
isRecursive Boolean  if isRecursive is set to true, tree nodes will be recursively expanded/collapsed down to its leaf nodes. If false, only its immediate

getColumn(columnName)

TreePanelColumn TreePanel::getColumn(String columnName)

Description

Returns the column using the provided column name.

Parameter Definition

Name Type Description
columnName String  Name of the column. Note, this is the column title that the end users sees

getColumnById(columnId)

TreePanelColumn TreePanel::getColumnById(String columnId)

Description

Returns the column using the provided column id.

Parameter Definition

Name Type Description
columnId String  Id of the column.

getColumnIds()

Set TreePanel::getColumnIds()

Description

returns a list of TreePanelColumn ids


getColumnLocation(columnName)

Integer TreePanel::getColumnLocation(String columnName)

Description

Returns the zero-indexed left based position of the column, -1 if hidden, -2 if it doesn't exist.

Parameter Definition

Name Type Description
columnName String 

getColumnSorting(columnName)

String TreePanel::getColumnSorting(String ... columnName)

Description

Returns the sort, returns true=ascending, false=descending, null=no sort or column not found.

Parameter Definition

Name Type Description
columnName String ... 

getColumnsFilter()

List TreePanel::getColumnsFilter()

Description

Returns a list of filtered columns.


getColumnsWithSort()

List TreePanel::getColumnsWithSort()

Description

Return a list of the names of the columns that have sorts.


getCurrentWhere()

String TreePanel::getCurrentWhere()

Description

Returns the currently applied filter.


getDefaultWhere()

String TreePanel::getDefaultWhere()

Description

Returns the default filter value.


getGrouping(groupingId)

TreePanelGrouping TreePanel::getGrouping(String groupingId)

Description

Returns the grouping using the provided id.

Parameter Definition

Name Type Description
groupingId String  id of the grouping

getGroupings()

List TreePanel::getGroupings()

Description

returns a list of TreePanelGrouping objects.


getHiddenColumnsCount()

Integer TreePanel::getHiddenColumnsCount()

Description

Returns the number of columns hidden from the panel.


getRows()

List TreePanel::getRows()

Description

Returns a list of all rows from the Panel.


getSearch()

String TreePanel::getSearch()

Description

Returns the last keyword(s) used to search the tree panel.


getSelectedRows()

List TreePanel::getSelectedRows()

Description

Returns a list of selected rows. Empty collection if no selection is made.


getVisibleColumnsCount()

Integer TreePanel::getVisibleColumnsCount()

Description

Returns the number of columns visible on the panel.


hideColumn(positionalColumnId)

Boolean TreePanel::hideColumn(Integer positionalColumnId)

Description

Hides a column specified by positionalColumnId. Returns false on invalid positional column id, true if operation is successful.

Parameter Definition

Name Type Description
positionalColumnId Integer  Positional Column Id (non-zero indexed)

hideColumn(columnName)

Boolean TreePanel::hideColumn(String columnName)

Description

Hides a column specified by columnName. Returns false on invalid columnName, true if operation is successful.

Parameter Definition

Name Type Description
columnName String  Name of the column.

hideColumnById(columnId)

Boolean TreePanel::hideColumnById(String columnId)

Description

Hides a column specified by the columnId. Returns false on invalid columnId, true if operation is successful.

Parameter Definition

Name Type Description
columnId String  Id of the column.

moveColumnsTo(pos,columnNames)

Object TreePanel::moveColumnsTo(Integer pos, String ... columnNames)

Description

Moves a list of columns to a particular position in the table, or hide them.

Parameter Definition

Name Type Description
pos Integer  zero-indexed left offset Position of the first column, or -1 to hide all columns
columnNames String ...  name of the columns to move in a comma delimited manner, from left to right

removeColumn(id)

Boolean TreePanel::removeColumn(String id)

Description

Removes the specified treepanel column

Parameter Definition

Name Type Description
id String  ID of the column to be removed

removeGrouping(groupingId)

Boolean TreePanel::removeGrouping(String groupingId)

Description

removes an existing grouping by the id. To find the group id use TreePanel:: getGroupings() and TreePanelGrouping::getId().

Parameter Definition

Name Type Description
groupingId String  An existing grouping id

removeGroupingAt(position)

Boolean TreePanel::removeGroupingAt(Integer position)

Description

removes an existing grouping column by it's index.

Parameter Definition

Name Type Description
position Integer  Position of the grouping to be removed (0 based position)

resetWhere()

Boolean TreePanel::resetWhere()

Description

Resets the current where filter to the default.


selectRows(selectedRowsText)

Boolean TreePanel::selectRows(String selectedRowsText)

Description

Overrides the currently selected rows with the supplied range of rows. If there is no currently selected rows, this method simply sets selected rows. Otherwise this will de-selected any previously selected rows then sets selected rows.

Parameter Definition

Name Type Description
selectedRowsText String  Comma delimited row indeces OR a range (selectRows("0,1,3,5") OR selectRows("5-10")).

setCurrentWhere(booleanExpression)

Boolean TreePanel::setCurrentWhere(String booleanExpression)

Description

Applies a filter on the underlying data for this table panel. If the filter is null or an empty string then no filter is applied and all data is shown.

Parameter Definition

Name Type Description
booleanExpression String  An expression to filter incoming data on, evaluating to true indicates the data is displayed, false means filtered out

setSearch(searchText)

Boolean TreePanel::setSearch(String searchText)

Description

Searches the Tree Panel with keyword specified by searchText. Empty string or null clears the seach selection. Successful search selects the first matched row and consecutive matches can be found by pressing the enter key.

Parameter Definition

Name Type Description
searchText String  Text to search for.

sort(columnId,descending,keepSorting,add)

Boolean TreePanel::sort(Integer columnId, Boolean descending, Boolean keepSorting, Boolean add)

Description

Sorts the rows based on the column specified by columnId.

Parameter Definition

Name Type Description
columnId Integer  Column Id (non-zero indexed)
descending Boolean  true for descending, false for ascending
keepSorting Boolean  Keep Sorting
add Boolean  Add

sort(columnName,ascending,keepSorting,add)

Boolean TreePanel::sort(String columnName, Boolean ascending, Boolean keepSorting, Boolean add)

Description

Sorts the rows based on the column specified by columnName.

Parameter Definition

Name Type Description
columnName String 
ascending Boolean  true for ascending, false for descending
keepSorting Boolean  Keep Sorting
add Boolean  Add