paramsForm.add(new Label("storeType", format.getName()));
paramsForm.add(new Label("storeTypeDescription", format.getDescription()));
// name
PropertyModel nameModel = new PropertyModel(model, "name");
final TextParamPanel namePanel = new TextParamPanel("namePanel", nameModel,
new ResourceModel("dataSrcName", "Data Source Name"), true);
paramsForm.add(namePanel);
// description and enabled
paramsForm.add(new TextParamPanel("descriptionPanel", new PropertyModel(model,
"description"), new ResourceModel("description", "Description"), false));
paramsForm.add(new CheckBoxParamPanel("enabledPanel", new PropertyModel(model, "enabled"),
new ResourceModel("enabled", "Enabled")));
// a custom converter will turn this into a namespace url
workspacePanel = new WorkspacePanel("workspacePanel",
new PropertyModel(model, "workspace"), new ResourceModel("workspace", "Workspace"),
true);
paramsForm.add(workspacePanel);
final StoreEditPanel storeEditPanel;
{
/*
* Here's where the extension point is applied in order to give extensions a chance to
* provide custom behavior/components for the coverage form other than the default
* single "url" input field
*/
GeoServerApplication app = getGeoServerApplication();
storeEditPanel = StoreExtensionPoints.getStoreEditPanel("parametersPanel", paramsForm,
store, app);
}
paramsForm.add(storeEditPanel);
// cancel/submit buttons
paramsForm.add(new BookmarkablePageLink("cancel", StorePage.class));
paramsForm.add(saveLink());
paramsForm.setDefaultButton(saveLink());
// feedback panel for error messages
paramsForm.add(new FeedbackPanel("feedback"));
StoreNameValidator storeNameValidator = new StoreNameValidator(workspacePanel
.getFormComponent(), namePanel.getFormComponent(), store.getId());
paramsForm.add(storeNameValidator);
}