use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnHideMethod.
/**
* @deprecated As of release 4.1, replaced by setOnHideCmd(JSMethod).
*/
@Deprecated
public void js_setOnHideMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnHideMethodID(scriptMethod.getID());
} else {
getForm().setOnHideMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnHideMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnSearchCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnSearchCmd(JSMethod).
*/
@Deprecated
public void js_setOnSearchCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnSearchCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnSearchCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnSearchCmdMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnRecordSelectionMethod.
/**
* @deprecated As of release 4.1, replaced by setOnRecordSelection(JSMethod).
*/
@Deprecated
public void js_setOnRecordSelectionMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnRecordSelectionMethodID(scriptMethod.getID());
} else {
getForm().setOnRecordSelectionMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnRecordSelectionMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnShowMethod.
/**
* @deprecated As of release 4.1, replaced by setOnShow(JSMethod).
*/
@Deprecated
public void js_setOnShowMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnShowMethodID(scriptMethod.getID());
} else {
getForm().setOnShowMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnShowMethodID(((Number) functionOrInteger).intValue());
}
}
use of org.mozilla.javascript.Function in project servoy-client by Servoy.
the class JSForm method js_setOnDuplicateRecordCmdMethod.
/**
* @deprecated As of release 4.1, replaced by setOnDuplicateRecordCmd(JSMethod).
*/
@Deprecated
@ServoyClientSupport(ng = false, wc = true, sc = true)
public void js_setOnDuplicateRecordCmdMethod(Object functionOrInteger) {
checkModification();
if (functionOrInteger instanceof Function) {
Function function = (Function) functionOrInteger;
ScriptMethod scriptMethod = getScriptMethod(function, application.getFlattenedSolution());
if (scriptMethod != null) {
getForm().setOnDuplicateRecordCmdMethodID(scriptMethod.getID());
} else {
getForm().setOnDuplicateRecordCmdMethodID(0);
}
} else if (functionOrInteger instanceof Number) {
getForm().setOnDuplicateRecordCmdMethodID(((Number) functionOrInteger).intValue());
}
}
Aggregations