Lets say i have the following entities on java side:
class Document {
@NotNull
@Nonnull
private List<@Nonnull User> permittedUsers;
}
class User {
@NotNull
@Nonnull
private String id;
@NotNull
@Nonnull
private String name;
}
and an edit-mask on typescript side:
@customElement('document-editor')
export class DocumentEditor extends View {
private readonly binder = new Binder(this, DocumentModel);
@state() private availableUsers?: Array<User>;
protected render(): unknown {
const model = this.binder.model;
return html`<vaadin-multi-select-combo-box .items="${this.availableUsers}" item-id-path="id" item-value-path="id" item-label-path="name" ${field(model.permittedUsers)}></vaadin-multi-select-combo-box>`;
}
Is this the correct way to use MultiSelectComboBox?
I ask this because i’m getting and NPE inside BinderNode.runOwnValidators because this[_validators] is used before initialization and i’m unsure if i simply use MultiSelectComboBox and/or Binder not the way it was intended or if this a bug to report.