form.add(namePanel);
// description and enabled
form.add(new TextParamPanel("descriptionPanel", new PropertyModel(model,
"description"), new ResourceModel("AbstractWMSStorePage.description", "Description"), false));
form.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);
form.add(workspacePanel);
capabilitiesURL = new TextParamPanel("capabilitiesURL", new PropertyModel(model, "capabilitiesURL"),
new ParamResourceModel("capabilitiesURL", AbstractWMSStorePage.this), true);
form.add(capabilitiesURL);
// user name
PropertyModel userModel = new PropertyModel(model, "username");
usernamePanel = new TextParamPanel("userNamePanel", userModel, new ResourceModel(
"AbstractWMSStorePage.userName"), false);
form.add(usernamePanel);
// password
PropertyModel passwordModel = new PropertyModel(model, "password");
form.add(password = new PasswordParamPanel("passwordPanel", passwordModel, new ResourceModel(
"AbstractWMSStorePage.password"), false));
// max concurrent connections
final PropertyModel<Boolean> useHttpConnectionPoolModel = new PropertyModel<Boolean>(model,
"useConnectionPooling");
CheckBoxParamPanel useConnectionPooling = new CheckBoxParamPanel(
"useConnectionPoolingPanel", useHttpConnectionPoolModel, new ResourceModel(
"AbstractWMSStorePage.useHttpConnectionPooling"));
form.add(useConnectionPooling);
PropertyModel<String> connectionsModel = new PropertyModel<String>(model, "maxConnections");
final TextParamPanel maxConnections = new TextParamPanel("maxConnectionsPanel",
connectionsModel, new ResourceModel("AbstractWMSStorePage.maxConnections"), true,
new RangeValidator<Integer>(1, 128));
maxConnections.setOutputMarkupId(true);
maxConnections.setEnabled(useHttpConnectionPoolModel.getObject());
form.add(maxConnections);
useConnectionPooling.getFormComponent().add(new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
boolean enabled = useHttpConnectionPoolModel.getObject();
maxConnections.setEnabled(enabled);