use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnFindCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnFindCmd(JSMethod).
*/
@Deprecated
public void js_setOnFindCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnFindCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnFindCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnFindCmdMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnDeleteAllRecordsCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnDeleteAllRecordsCmd(JSMethod).
*/
@Deprecated
public void js_setOnDeleteAllRecordsCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnDeleteAllRecordsCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnDeleteAllRecordsCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnDeleteAllRecordsCmdMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnNewRecordCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnNewRecordCmd(JSMethod).
*/
@Deprecated
public void js_setOnNewRecordCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnNewRecordCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnNewRecordCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnNewRecordCmdMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnShowOmittedRecordsCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnShowOmittedRecordsCmd(JSMethod).
*/
@Deprecated
public void js_setOnShowOmittedRecordsCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnShowOmittedRecordsCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnShowOmittedRecordsCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnShowOmittedRecordsCmdMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnNextRecordCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnNextRecordCmd(JSMethod).
*/
@Deprecated
public void js_setOnNextRecordCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnNextRecordCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnNextRecordCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnNextRecordCmdMethodID(((Number) functionOrInteger).intValue());
}
}
Aggregations