Package org.geoserver.web.util

Examples of org.geoserver.web.util.MapModel


    public InspireAdminPanel(final String id, final IModel<ServiceInfo> model) {
        super(id, model);

        PropertyModel<MetadataMap> metadata = new PropertyModel<MetadataMap>(model, "metadata");

        add(new LanguageDropDownChoice("language", new MapModel(metadata, LANGUAGE.key)));

        TextField textField = new TextField("metadataURL", new MapModel(metadata,
                SERVICE_METADATA_URL.key));
        add(textField);
        textField.add(new AttributeModifier("title", true, new ResourceModel(
                "InspireAdminPanel.metadataURL.title")));

        final Map<String, String> mdUrlTypes = new HashMap<String, String>();
        mdUrlTypes.put("application/vnd.ogc.csw.GetRecordByIdResponse_xml",
                "CSW GetRecordById Response");
        mdUrlTypes.put("application/vnd.iso.19139+xml", "ISO 19139 ServiceMetadata record");

        IModel<String> urlTypeModel = new MapModel(metadata, SERVICE_METADATA_TYPE.key);

        IChoiceRenderer<String> urlTypeChoiceRenderer = new IChoiceRenderer<String>() {
            private static final long serialVersionUID = 1L;

            public Object getDisplayValue(final String key) {
View Full Code Here


        this.portComponent = port;
        this.instanceComponent = instance;
        this.userComponent = user;
        this.passwordComponent = password;

        final MapModel tableNameModel = new MapModel(paramsModel, TABLE_NAME);

        List<String> choices = new ArrayList<String>();
        if (tableNameModel.getObject() != null) {
            Object currentTableName = tableNameModel.getObject();
            choices.add(String.valueOf(currentTableName));
        }

        choice = new DropDownChoice("rasterTable", tableNameModel, choices);
View Full Code Here

        // this panel is visible only if the reader is a structured grid coverage one
        setVisible(isStructuredCoverage(model));

        // add the checkbox to enable exposing a layer as a dataset
        MapModel datasetModel = new MapModel(new PropertyModel<MetadataMap>(model,
                "resource.metadata"), WCSEOMetadata.DATASET.key);
        CheckBox dataset = new CheckBox("dataset", datasetModel);
        add(dataset);
    }
View Full Code Here

    public WCSEOAdminPanel(String id, IModel<?> model) {
        super(id, model);

        PropertyModel<MetadataMap> metadata = new PropertyModel<MetadataMap>(model, "metadata");

        CheckBox enabled = new CheckBox("enabled", new MapModel(metadata,
                WCSEOMetadata.ENABLED.key));
        add(enabled);
       
        TextField<Integer> defaultCount = new TextField<Integer>("defaultCount", new MapModel(metadata,
                WCSEOMetadata.COUNT_DEFAULT.key), Integer.class);
        defaultCount.add(new MinimumValidator<Integer>(1));
        add(defaultCount);
    }
View Full Code Here

        final IModel model = storeEditForm.getModel();
        setDefaultModel(model);

        final IModel paramsModel = new PropertyModel(model, "connectionParameters");
        new MapModel(paramsModel, CONFIGURATION.key).setObject(null);

        add(new TextParamPanel("parallelism", new MapModel(paramsModel, PARALLELISM.key),
                new ParamResourceModel("parallelism", this), true));

        add(new CheckBoxParamPanel("tolerateErrors", new MapModel(paramsModel,
                TOLERATE_CONNECTION_FAILURE.key), new ParamResourceModel("tolerateErrors", this)));

        configModel = new ConfigModel(new MapModel(paramsModel, CONFIGURATION_XML.key));
        configs = configModel.getObject();
        if(configs == null) {
            configs = new ArrayList<AggregateTypeConfiguration>();
            configModel.setObject(configs);
        }
View Full Code Here

        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;
View Full Code Here

    private FormComponent addPasswordPanel(final IModel paramsModel, final String paramName) {

        final String resourceKey = RESOURCE_KEY_PREFIX + "." + paramName;

        final PasswordParamPanel pwdPanel = new PasswordParamPanel(paramName, new MapModel(
                paramsModel, paramName), new ResourceModel(resourceKey, paramName), true);
        add(pwdPanel);

        String defaultTitle = paramName;
View Full Code Here

    }
   
    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;

View Full Code Here

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private void initActiveLayer(IModel model) {
    PropertyModel propertyModel = new PropertyModel(model,
        "resource.metadata");
    activeLayer = new CheckBox("x3dlayer", new MapModel(propertyModel,
        "x3d.activate")) {
      /*
       * @Override public void onSelectionChanged(final Object
       * newSelection) { boolean valor = this.getModelObject(); if (valor)
       * activeLayer(true); else activeLayer(false); }
View Full Code Here

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private void initQueryable(IModel model) {
    PropertyModel propertyModel = new PropertyModel(model,
        "resource.metadata");
    queryable = new CheckBox("x3dqueryable", new MapModel(propertyModel,
        "x3d.queryable"));
    add(queryable);
  }
View Full Code Here

TOP

Related Classes of org.geoserver.web.util.MapModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.