Hello,
I am trying to extend StringField.js with my custom StringField called MyCustomStringField.js
I created FormField in form and added annotation @ModelVariant("MyCustom")
I created MyCustomStringField.js class that extends StringField from Scout like this:
import { StringField } from '@eclipse-scout/core';
export default class MyCustomStringField extends StringField {
constructor() {
super();
}
_render() {
super._render();
console.log("Component testing");
}
}
I included MyCustomStringField like this in index.js:
export {default as MyCustomStringField} from './MyCustomStringField';
// Define namespace and put it onto window (necessary for model variants, e.g. @ModelVariant(${classPrefixLowerCase}.Example)
import * as self from './index.js';
export default self;
window.testing= Object.assign(window.testing|| {}, self);
I have this error when opening form...
[ERROR] App initialization failed Error: Failed to create object for objectType "StringField:MyCustom": Could not find "MyCustomStringField" in namespace ""
Please can you help? Why is namespace empty "" in error description?
Did I forgot to add something?
Thanks