使用范围:UI2
Contents
class Row ($UI/system/components/justep/data/data#Row) extends Object
data的行数据对象
Constructor Top
Row () |
Properties Top
data
[filed][readonly]行数据的data对象 |
Methods Top
void |
assign
(Row row, List |
|
void | cancelUpdates () | |
List | children () | |
Any | getID () | |
Any | getValue (String col) | |
Boolean | hasChildren () | |
Integer, Integer | int | index () | |
String | label (String col) | |
Any | oval (String col) | |
Row | parent () | |
void | ref (String col) | |
Any | setValue (String col, String value) | |
Array<Row> | toJson (JsonParam option) | |
Any | val (String col, String value) |
Constructor details
Top
public
Row
()
data的行数据对象
public
Row
()
data的行数据对象
Properties Detail Top
public
data
[filed][readonly]行数据的data对象
Methods Detail Top
整行赋值
public
void
cancelUpdates
()
还原行修改数据
获取行数据的子数据,但没有时返回undefined
public
Any
getID
()
获取当前行的ID
public
Any
getValue
(String col)
对应列取值
var row = this.comp('mainData').getCurrentRow(); row.val('fName');//获取fName列的值
public
Boolean
hasChildren
()
行数据是否有子数据
public
Integer, Integer | int
index
()
行数据索引
public
String
label
(String col)
对应列的显示名称,主要用于感知组件的bind
var row = this.comp('mainData').getCurrentRow(); row.label('fName');//获取fName列的显示名称
public
Any
oval
(String col)
保存前获取修改后列原值,保存后同val取得值
行数据的parent对象,当是树形数据时有效
public
void
ref
(String col)
返回对应列的观察对象,主要用于感知组件的bind
var row = this.comp('mainData').getCurrentRow(); row.ref('fName').get();//获取fName列的值 row.ref('fName').set('wang');//给fName列赋值
public
Any
setValue
(String col, String value)
对应列者赋值
var row = this.comp('mainData').getCurrentRow(); row.val('fName');//获取fName列的值 row.val('fName','wang');//给fName列赋值
获取row的json格式序列化对象
public
Any
val
(String col, String value)
对应列者赋值
var row = this.comp('mainData').getCurrentRow(); row.val('fName');//获取fName列的值 row.val('fName','wang');//给fName列赋值