dojox/grid/enhanced/plugins/filter/_ConditionExpr._DataExpr (version 1.10)

Summary

The most abstract class for all data expressions. A _DataExpr is a condition expression for a single data value. If the data value to be represent is a pure value (literal value, like string/number/Date/...) this _DataExpr is nothing more than a simple wrapper. If the data value to be represent is in a store, then _DataExpr is responsible to extract it from the store when this condition is applied to a data row.

Usage

var foo = new _ConditionExpr._DataExpr(dataValue,isColumn,convertArgs);
dojox/grid/enhanced/plugins/filter/_ConditionExpr
Parameter Type Description
dataValue anything

If isColumn is a boolean true, then it should be a kind of column information, like field name or column index. Otherwise, it is regarded as a pure value, and the getValue method will simply return it.

isColumn boolean
Optional

Optional. To specify whether this _DataExpr represents a column or a pure value.

convertArgs object

Property Summary

Method Summary

  • _convertData(dataValue)
  • applyRow(datarow,getter) Implement _ConditionExpr.applyRow.
  • getName() Get the name of this kind of expression.
  • getValue() If this is a pure value wrapper, simply return the value.
  • toObject() Overrided from _ConditionExpr.toObject

Properties

Methods

_convertData(dataValue)
Parameter Type Description
dataValue anything

This argument should come from a store.

Returns:anything

This argument should come from a store.

applyRow(datarow,getter)

Implement _ConditionExpr.applyRow. If this is a pure value, simply return self. Otherwise, extract the cell data from datarow using the given getter function, and then convert this cell data to a _DataExpr and return the expression.

An object with the following properties:

  • _name
  • applyRow:

    Unimplemented Interface Apply this condition expression on the given datarow, return a result expression.

  • toObject:

    Convert this data expression to a simple object. Mainly used for serialization.

  • getName:

    Get the name of this kind of expression.

Parameter Type Description
datarow data item
getter function(row,colIdx)
Returns:Object

Implement _ConditionExpr.applyRow. If this is a pure value, simply return self. Otherwise, extract the cell data from datarow using the given getter function, and then convert this cell data to a _DataExpr and return the expression.

getName()

Get the name of this kind of expression.

Returns:any | undefined

the name of this kind of expression

getValue()

If this is a pure value wrapper, simply return the value. Otherwise (it's a column), return is undefined.

Returns:any | undefined

the value of this data expression.

toObject()

Overrided from _ConditionExpr.toObject

Returns:String
Error in the documentation? Can’t find what you are looking for? Let us know!