private final IModel<String> contentEditorModel;
public EditTab(String id, final IModel<BrixNode> nodeModel) {
super(id, nodeModel);
Brix brix = getModelObject().getBrix();
Form<Void> form = new Form<Void>("form");
add(form);
final ModelBuffer adapter = new ModelBuffer(nodeModel);
IModel<String> stringModel = adapter.forProperty("title");
form.add(new TextField<String>("title", stringModel));
String workspace = nodeModel.getObject().getSession().getWorkspace().getName();
NodeFilter filter = new NodeTypeFilter(TemplateSiteNodePlugin.TYPE);
IModel<BrixNode> model = adapter.forNodeProperty("template");
form.add(new SiteNodePickerPanel("templatePicker", model, workspace, filter));
IModel<Boolean> booleanModel = adapter.forProperty("requiresSSL");
form.add(new ProtocolSelector("requiresSSL", booleanModel));
IModel<String> mimeTypeModel = adapter.forProperty("mimeType");
form.add(new TextField<String>("mimeType", mimeTypeModel));
// set up markup editor
contentEditorModel = adapter.forProperty("dataAsString");
contentEditorParent = form;
Collection<MarkupEditorFactory> editorFactories = brix.getConfig().getRegistry()
.lookupCollection(MarkupEditorFactory.POINT);
setupEditor(editorFactories.iterator().next().getClass().getName());
// set up buttons to control editor switching