Search in sources :

Example 1 with IJSRecord

use of com.servoy.base.scripting.api.IJSRecord in project servoy-client by Servoy.

the class FoundSet method getSelectedRecord.

/**
 * Get the selected record.
 *
 * @sample var selectedRecord = %%prefix%%foundset.getSelectedRecord();
 * @return Record record.
 */
@JSFunction
public IJSRecord getSelectedRecord() {
    checkSelection();
    IJSRecord record = (IJSRecord) getRecord(getSelectedIndex());
    // safety, do not return proto
    return record == getPrototypeState() ? null : record;
}
Also used : IJSRecord(com.servoy.base.scripting.api.IJSRecord) JSFunction(org.mozilla.javascript.annotations.JSFunction)

Aggregations

IJSRecord (com.servoy.base.scripting.api.IJSRecord)1 JSFunction (org.mozilla.javascript.annotations.JSFunction)1