add(label);
label.setOutputMarkupId(true);
NodeFilter filter = new NodeTypeFilter(TemplateSiteNodePlugin.TYPE);
SiteNodePickerPanel picker = new SiteNodePickerPanel("picker", model, workspace, false, filter) {
@Override
public boolean isVisible() {
return isEditing();
}
@Override
protected IModel<String> newLabelModel() {
return new AbstractModel<String>() {
@Override
public String getObject() {
return "";
}
};
}
@Override
protected void onUpdate(AjaxRequestTarget target) {
super.onUpdate(target);
target.addComponent(label);
}
};
picker.setOutputMarkupPlaceholderTag(true);
add(picker);
}