Resource icon = getItemIconGenerator().apply(value);
if (icon != null) {
if (icon instanceof ConnectorResource) {
+ if (!isAttached()) {
+ // Deferred resource generation.
+ return;
+ }
setResource("selected", icon);
}
selectedItemIcon = ResourceReference
getState().selectedItemIcon = selectedItemIcon;
}
+ @Override
+ public void attach() {
+ super.attach();
+
+ updateSelectedItemIcon();
+ }
+
@Override
protected Element writeItem(Element design, T item, DesignContext context) {
Element element = design.appendElement("option");