Hi all, I’m having a problem indentifying the instance of a component. JSField are not detected.
var _formComponents = _jsForm.getComponents();
for (var k = 1; k <= _formComponents.length; k++) {
/** @type {JSLabel|JSField} */
var _jsComponent = _formComponents[k - 1];
var _elementType = null;
if (_jsComponent instanceof JSField) {
_elementType = _bandElement.CONSTANTS.bandElementTypes.TEXT_FIELD;
} else if (_jsComponent instanceof JSLabel) {
_elementType = _bandElement.CONSTANTS.bandElementTypes.STATIC_TEXT;
}
application.output(_elementType); // JSField returns null. Running with debugger you can see that the instanceof JSField condition never applies
}
I’m using Servoy 7.4.0 - build 2026