Package org.geoserver.web.util

Examples of org.geoserver.web.util.MapModel


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


            IModel namespaceModel = new NamespaceParamModel(paramsModel, paramName);
            IModel paramLabelModel = new ResourceModel(paramLabel, paramLabel);
            parameterPanel = new NamespacePanel(componentId, namespaceModel, paramLabelModel, true);
        } else if (Boolean.class == binding) {
            // TODO Add prefix for better i18n?
            parameterPanel = new CheckBoxParamPanel(componentId, new MapModel(paramsModel,
                    paramName), new ResourceModel(paramLabel, paramLabel));

        } else if (String.class == binding && paramMetadata.isPassword()) {
            parameterPanel = new PasswordParamPanel(componentId, new MapModel(paramsModel,
                    paramName), new ResourceModel(paramLabel, paramLabel), required);
        } else {
            IModel model;
            if("url".equalsIgnoreCase(paramName)) {
                model = new URLModel(paramsModel, paramName);
            } else {
                model = new MapModel(paramsModel, paramName);
            }
           
            TextParamPanel tp = new TextParamPanel(componentId,
                    model, new ResourceModel(paramLabel, paramLabel), required);
            // if it can be a reference to the local filesystem make sure it's valid
View Full Code Here

            }
        };

        PropertyModel<MetadataMap> metadataModel = new PropertyModel<MetadataMap>(wmsInfoModel,
                "metadata");
        IModel<Boolean> wmsIntegrationEnabledModel = new MapModel(metadataModel,
                GWC.WMS_INTEGRATION_ENABLED_KEY);

        CheckBox wmsIntegration = checkbox("enableWMSIntegration", wmsIntegrationEnabledModel,
                "GWCSettingsPage.enableWMSIntegration.title");
        form.add(wmsIntegration);
View Full Code Here

                        "ExtraStylesPalette.availableHeader"));
            }
        };
        styleContainer.add(extraStyles);
       
        TextField renderingBuffer = new TextField("renderingBuffer", new MapModel(new PropertyModel(layerModel, "metadata"), LayerInfo.BUFFER), Integer.class);
        renderingBuffer.add(NumberValidator.minimum(0));
        styleContainer.add(renderingBuffer);
       
        add(new TextField("wmsPath", new PropertyModel(layerModel, "path")));
       
View Full Code Here

            /*
             * We're editing an existing store. Don't allow to change the table name, it could be
             * catastrophic for the Catalog/ResourcePool as ability to get to the coverage is really
             * based on the Store's URL and the CoverageInfo is tied to it
             */
            final IModel paramValue = new MapModel(paramsModel, TABLE_NAME);
            final String resourceKey = RESOURCE_KEY_PREFIX + "." + TABLE_NAME;
            final IModel paramLabelModel = new ResourceModel(resourceKey, TABLE_NAME);
            final boolean required = true;
            TextParamPanel tableNamePanel;
            tableNamePanel = new TextParamPanel(panelId, paramValue, paramLabelModel, required);
View Full Code Here

    private FormComponent addPasswordPanel(final IModel paramsModel) {

        final String paramName = PASSWORD_PARAM.key;
        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 = String.valueOf(PASSWORD_PARAM.title);
View Full Code Here

        final String paramName = param.key;
        final String resourceKey = getClass().getSimpleName() + "." + paramName;

        final boolean required = param.required;

        final TextParamPanel textParamPanel = new TextParamPanel(paramName, new MapModel(
                paramsModel, paramName), new ResourceModel(resourceKey, paramName), required);
        textParamPanel.getFormComponent().setType(param.type);

        String defaultTitle = String.valueOf(param.title);
View Full Code Here

    public ShapefileDirectoryEditPanel(final String componentId, final Form storeEditForm) {
        super(componentId, storeEditForm);
    }

    protected FileParamPanel buildFileParamPanel(final IModel paramsModel) {
        FileParamPanel file = new DirectoryParamPanel("url", new MapModel(paramsModel, URLP.key),
                new ParamResourceModel("shapefile", this), true);
        file.setFileFilter(new Model<ExtensionFileFilter>(new ExtensionFileFilter(".shp")));
        return file;
    }
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

        final IModel paramsModel = new PropertyModel(model, "connectionParameters");

        FileParamPanel file = buildFileParamPanel(paramsModel);
        add(file);

        add(new CharsetPanel("charset", new MapModel(paramsModel, DBFCHARSET.key),
                new ParamResourceModel("charset", this), false));

        add(new CheckBoxParamPanel("memoryMapped", new MapModel(paramsModel, MEMORY_MAPPED.key),
                new ParamResourceModel("memoryMapped", this)));
        add(new CheckBoxParamPanel("cacheMemoryMaps", new MapModel(paramsModel,
                CACHE_MEMORY_MAPS.key), new ParamResourceModel("cacheMemoryMaps", this)));

        add(new CheckBoxParamPanel("spatialIndex", new MapModel(paramsModel,
                CREATE_SPATIAL_INDEX.key), new ParamResourceModel("spatialIndex", this)));
    }
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.