Home Reference Source
public class | source

Filter

Extends:

TypedObject → Filter

A container object that encapsulates all the individual property filter settings, page settings and the sort state.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

For the filter dropdown, show the label for the pre built filters.

public

A collection of com.flexicious.grids.filters.FilterExpression objects.

public

The number of pages

public

The current page index.

public

Size of the page

public

The total number of records

public

List of records

public

A collection of com.flexicious.grids.filters.FilterSort objects.

Method Summary

Public Methods
public

addCriteria(columnName: String, expression: Object)

Adds a FilterExpression to the current list Uses the default equality operator.

public

addFilterExpression(filterExpression: flexiciousNmsp.FilterExpression)

Expression to add

public

addOperatorCriteria(columnName: String, operation: String, compareValue: Object, wasContains: Boolean)

Adds a com.flexicious.grids.filters.FilterExpression to the current list.

public

addSort(sortColumn: String, isAscending: Boolean, sortComparisionType: String, sortCompareFunction: Function)

Adds a com.flexicious.grids.filters.FilterSort object to the list.

public

copyFrom(filter: Object)

Takes a filter and populates the current filter's properties with the provided filter

public
public

Given a filter column, returns the corresponding filter expression.

public
public

Given a filter column, returns the corresponding value of the filter expression of that column.

public

removeCriteria(searchField: String)

Removes a previously added FilterExpression from the current list that matches the specified search field.

public

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

Public Constructors

public constructor() source

Override:

TypedObject#constructor

Public Members

public filterDescrption: string source

For the filter dropdown, show the label for the pre built filters.

Properties:

NameTypeAttributeDescription
filterDescrption *

public filterExpressions: Array source

A collection of com.flexicious.grids.filters.FilterExpression objects.

Properties:

NameTypeAttributeDescription
filterExpressions *

public pageCount: number source

The number of pages

Properties:

NameTypeAttributeDescription
pageCount *

public pageIndex: number source

The current page index.

Properties:

NameTypeAttributeDescription
pageIndex *

public pageSize: number source

Size of the page

Properties:

NameTypeAttributeDescription
pageSize *

public recordCount: number source

The total number of records

Properties:

NameTypeAttributeDescription
recordCount *

public records: Object source

List of records

Properties:

NameTypeAttributeDescription
records *

public sorts: Array source

A collection of com.flexicious.grids.filters.FilterSort objects. Must be just 1 for Basic DataGrid, but can be more than one for advanced datagrid.

Properties:

NameTypeAttributeDescription
sorts *

Public Methods

public addCriteria(columnName: String, expression: Object) source

Adds a FilterExpression to the current list Uses the default equality operator.

Params:

NameTypeAttributeDescription
columnName String
expression Object

public addFilterExpression(filterExpression: flexiciousNmsp.FilterExpression) source

Expression to add

Params:

NameTypeAttributeDescription
filterExpression flexiciousNmsp.FilterExpression

public addOperatorCriteria(columnName: String, operation: String, compareValue: Object, wasContains: Boolean) source

Adds a com.flexicious.grids.filters.FilterExpression to the current list. If an Filter Expression was added with the same column name previously, overwrites the operation and the compareValue

Params:

NameTypeAttributeDescription
columnName String

The column to filter on

operation String

The filter operation to apply. See com.flexicious.grids.filters.FilterExpression for a list of available operations.

compareValue Object

The expression to filter with. A single value in case of Binary operators like equals, greater than, less than, and an array for rante operators like between, in list, etc.

wasContains Boolean

public addSort(sortColumn: String, isAscending: Boolean, sortComparisionType: String, sortCompareFunction: Function) source

Adds a com.flexicious.grids.filters.FilterSort object to the list. Must be just 1 for Basic DataGrid, but can be more than one for advanced datagrid.

Params:

NameTypeAttributeDescription
sortColumn String
isAscending Boolean
sortComparisionType String

default value is "auto"

sortCompareFunction Function

public copyFrom(filter: Object) source

Takes a filter and populates the current filter's properties with the provided filter

Params:

NameTypeAttributeDescription
filter Object

to copy

public getClassNames(): string[] source

Returns a list of strings that represent the object hierarchy for this object.

Override:

TypedObject#getClassNames

Return:

string[]

public getFilterExpression(fld: String): * source

Given a filter column, returns the corresponding filter expression.

Params:

NameTypeAttributeDescription
fld String

Return:

*

public getFilterExpressions(): Object source

Return:

Object

public getFilterValue(fld: String): * source

Given a filter column, returns the corresponding value of the filter expression of that column.

Params:

NameTypeAttributeDescription
fld String

Return:

*

public removeCriteria(searchField: String) source

Removes a previously added FilterExpression from the current list that matches the specified search field.

Params:

NameTypeAttributeDescription
searchField String

public setFilterExpressions(val: *): * source

Params:

NameTypeAttributeDescription
val *

Return:

*