TextParamPanel panel = new TextParamPanel(id, valueModel, labelModel, false); if (Number.class.isAssignableFrom(valueClass)) { panel.getFormComponent().setType(valueClass); return new TextParamPanel(id, valueModel, labelModel, false);
private Component getInputComponent(String id, IModel paramsModel, String keyName) { if (keyName.contains("Color")) return new ColorPickerPanel(id, new MapModel(paramsModel, keyName), new org.apache.wicket.model.ResourceModel(keyName, keyName), false); else return new TextParamPanel(id, new MapModel(paramsModel, keyName), new org.apache.wicket.model.ResourceModel(keyName, keyName), false); } }
private FormComponent addTextPanel(final IModel paramsModel, final String paramName) { final String resourceKey = getClass().getSimpleName() + "." + paramName; final boolean required = true; final TextParamPanel textParamPanel = new TextParamPanel( paramName, new MapModel(paramsModel, paramName), new ResourceModel(resourceKey, paramName), required); textParamPanel.getFormComponent().setType(String.class); String defaultTitle = paramName; ResourceModel titleModel = new ResourceModel(resourceKey + ".title", defaultTitle); String title = String.valueOf(titleModel.getObject()); textParamPanel.add(AttributeModifier.replace("title", title)); add(textParamPanel); return textParamPanel.getFormComponent(); } }
private FormComponent addTextPanel( final IModel paramsModel, final String paramName, final String paramTitle, final boolean required) { final String resourceKey = getClass().getSimpleName() + "." + paramName; final TextParamPanel textParamPanel = new TextParamPanel( paramName, new MapModel(paramsModel, paramTitle), new ResourceModel(resourceKey, paramName), required); textParamPanel.getFormComponent().setType(String.class /*param.type*/); String defaultTitle = paramTitle; ResourceModel titleModel = new ResourceModel(resourceKey + ".title", defaultTitle); String title = String.valueOf(titleModel.getObject()); textParamPanel.add(AttributeModifier.replace("title", title)); add(textParamPanel); return textParamPanel.getFormComponent(); }
public S3InfoPanel(String componentId, Form storeEditForm) { super(componentId, storeEditForm); IModel model = storeEditForm.getModel(); setDefaultModel(model); IModel paramsModel = new PropertyModel(model, "connectionParameters"); TextParamPanel urlPanel = new TextParamPanel( "url", new PropertyModel(model, "URL"), new ResourceModel("url", "URL"), true, null); add(urlPanel); } }
public DefaultCoverageStoreEditPanel(final String componentId, final Form storeEditForm) { super(componentId, storeEditForm); final IModel formModel = storeEditForm.getModel(); // url TextParamPanel url = new TextParamPanel("urlPanel", new PropertyModel(formModel, "URL"), new ResourceModel("url", "URL"), true); url.getFormComponent().add(new FileExistsValidator()); add(url); }
public DefaultCoverageStoreEditPanel(final String componentId, final Form storeEditForm) { super(componentId, storeEditForm); final IModel formModel = storeEditForm.getModel(); // url TextParamPanel url = new TextParamPanel( "urlPanel", new PropertyModel(formModel, "URL"), new ResourceModel("url", "URL"), true); url.getFormComponent().add(new FileExistsValidator()); add(url); } }
TextParamPanel tp = new TextParamPanel(componentId, model, new ResourceModel(paramLabel, paramLabel), required); tp.setVisible(false); model, new ResourceModel(paramLabel, paramLabel), required); } else { tp = new TextParamPanel(componentId, model, new ResourceModel(paramLabel, paramLabel), required);
new TextParamPanel( "hostPanel", new PropertyModel<>(model, "host"), add(hostPanel); portPanel = new TextParamPanel( "portPanel", new PropertyModel<>(model, "port"), add(portPanel); dbPanel = new TextParamPanel( "dbPanel", new PropertyModel<>(model, "database"), add(dbPanel); schemaPanel = new TextParamPanel( "schemaPanel", new PropertyModel<>(model, "schema"), add(schemaPanel); usernamePanel = new TextParamPanel( "usernamePanel", new PropertyModel<>(model, "username"),
new TextParamPanel( "repositoryNamePanel", nameModel,
} else { tp = new TextParamPanel( componentId, model,
new TextParamPanel( "repositoryNamePanel", new PropertyModel(formModel, "repoName"),
dataStoreNamePanel = new TextParamPanel("dataStoreNamePanel", new PropertyModel(model, "name"), new ResourceModel("AbstractDataAccessPage.dataSrcName", "Data Source Name"), true); paramsForm.add(dataStoreNamePanel); paramsForm.add(new TextParamPanel("dataStoreDescriptionPanel", new PropertyModel(model, "description"), new ResourceModel("AbstractDataAccessPage.description", "Description"), false, (IValidator[]) null));
final TextParamPanel namePanel = new TextParamPanel("namePanel", nameModel, new ResourceModel("AbstractWMSStorePage.dataSrcName", "Data Source Name"), true); form.add(new TextParamPanel("descriptionPanel", new PropertyModel(model, "description"), new ResourceModel("AbstractWMSStorePage.description", "Description"), false)); form.add(new CheckBoxParamPanel("enabledPanel", new PropertyModel(model, "enabled"), form.add(workspacePanel); capabilitiesURL = new TextParamPanel("capabilitiesURL", new PropertyModel(model, "capabilitiesURL"), new ParamResourceModel("capabilitiesURL", AbstractWMSStorePage.this), true); form.add(capabilitiesURL); usernamePanel = new TextParamPanel("userNamePanel", userModel, new ResourceModel( "AbstractWMSStorePage.userName"), false); final TextParamPanel maxConnections = new TextParamPanel("maxConnectionsPanel", connectionsModel, new ResourceModel("AbstractWMSStorePage.maxConnections"), true, new RangeValidator<Integer>(1, 128)); form.add(new TextParamPanel("connectTimeoutPanel", connectTimeoutModel, new ResourceModel( "AbstractWMSStorePage.connectTimeout"), true, new RangeValidator<Integer>(1, 240))); form.add(new TextParamPanel("readTimeoutPanel", readTimeoutModel, new ResourceModel( "AbstractWMSStorePage.readTimeout"), true, new RangeValidator<Integer>(1, 360)));
new TextParamPanel( "namePanel", nameModel, new TextParamPanel( "descriptionPanel", new PropertyModel(model, "description"), new TextParamPanel( "capabilitiesURL", new PropertyModel(model, "capabilitiesURL"), new TextParamPanel( "userNamePanel", userModel, new TextParamPanel( "headerNamePanel", headerNameModel, new TextParamPanel( "headerValuePanel", headerValueModel, new TextParamPanel( "maxConnectionsPanel", connectionsModel, new PropertyModel<Integer>(model, "connectTimeout");
final TextParamPanel namePanel = new TextParamPanel("namePanel", nameModel, new ResourceModel("AbstractCoverageStorePage.dataSrcName", "Data Source Name"), true); paramsForm.add(new TextParamPanel("descriptionPanel", new PropertyModel(model, "description"), new ResourceModel("AbstractCoverageStorePage.description", "Description"), false)); paramsForm.add(new CheckBoxParamPanel("enabledPanel", new PropertyModel(model, "enabled"),
new TextParamPanel( "namePanel", nameModel, new TextParamPanel( "descriptionPanel", new PropertyModel(model, "description"),
new TextParamPanel( "dataStoreNamePanel", new PropertyModel(model, "name"), new TextParamPanel( "dataStoreDescriptionPanel", new PropertyModel(model, "description"),
new TextParamPanel( "namePanel", nameModel, new TextParamPanel( "descriptionPanel", new PropertyModel(model, "description"), new TextParamPanel( "capabilitiesURL", new PropertyModel(model, "capabilitiesURL"), new TextParamPanel( "userNamePanel", userModel, new TextParamPanel( "maxConnectionsPanel", connectionsModel, new PropertyModel<Integer>(model, "connectTimeout"); form.add( new TextParamPanel( "connectTimeoutPanel", connectTimeoutModel, new TextParamPanel( "readTimeoutPanel", readTimeoutModel,
new TextParamPanel( "urlPanel", new PropertyModel(paramsModel, "URL"),