Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.FileExistsValidator


           
            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
            if (paramName.equalsIgnoreCase("url")) {
                tp.getFormComponent().add(new FileExistsValidator());
            }
            // make sure the proper value is returned, but don't set it for strings otherwise
            // we incur in a wicket bug (the empty string is not converter back to a null)
            // GR: it doesn't work for File neither.
            // AA: better not mess with files, the converters turn data dir relative to
View Full Code Here


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

    protected FileParamPanel buildFileParamPanel(final IModel paramsModel) {
        FileParamPanel file = new FileParamPanel("url", new MapModel(paramsModel, URLP.key),
                new ParamResourceModel("shapefile", this), true);
        file.setFileFilter(new Model(new ExtensionFileFilter(".shp")));
        file.getFormComponent().add(new FileExistsValidator());
        return file;
    }
View Full Code Here

        TextField<Integer> maxErrors = new TextField<Integer>("maxRenderingErrors");
        maxErrors.add(new MinimumValidator<Integer>(0));
        form.add(maxErrors);
      // watermark
      form.add(new CheckBox("watermark.enabled"));
      form.add(new TextField("watermark.uRL").add(new FileExistsValidator(true)));
      TextField<Integer> transparency = new TextField<Integer>("watermark.transparency");
      transparency.add(new RangeValidator<Integer>(0,100));
        form.add(transparency);
      form.add(new DropDownChoice("watermark.position", Arrays.asList(Position.values()), new WatermarkPositionRenderer()));
      // svg
View Full Code Here

           
            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
            if (paramName.equalsIgnoreCase("url")) {
                tp.getFormComponent().add(new FileExistsValidator());
            }
            // make sure the proper value is returned, but don't set it for strings otherwise
            // we incur in a wicket bug (the empty string is not converter back to a null)
            // GR: it doesn't work for File neither.
            // AA: better not mess with files, the converters turn data dir relative to
View Full Code Here

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

        FileParamPanel file = new FileParamPanel("url", new PropertyModel(model, "URL"),
                new ResourceModel("url", "URL"), true);
        file.getFormComponent().add(new FileExistsValidator());
        if (fileExtensions != null && fileExtensions.length > 0) {
            file.setFileFilter(new Model(new ExtensionFileFilter(fileExtensions)));
        }
        add(file);
    }
View Full Code Here

        // TODO: Check whether this constructor is properly setup
        final TextParamPanel url = new TextParamPanel("urlPanel", new PropertyModel(paramsModel, "URL"),
                new ResourceModel("url", "URL"), true);
        final FormComponent urlFormComponent = url.getFormComponent();
        urlFormComponent.add(new FileExistsValidator());
        add(url);
       
        // enabled flag, and show the rest only if enabled is true
        IModel<Boolean> enabledModel = new Model<Boolean>(false);
        enabled = new CheckBox("enabled", enabledModel);
View Full Code Here

    protected FileParamPanel buildFileParamPanel(final IModel paramsModel) {
        FileParamPanel file = new FileParamPanel("url", new MapModel(paramsModel, URLP.key),
                new ParamResourceModel("shapefile", this), true);
        file.setFileFilter(new Model(new ExtensionFileFilter(".shp")));
        file.getFormComponent().add(new FileExistsValidator());
        return file;
    }
View Full Code Here

        } else {
            file = new FileParamPanel("url", new PropertyModel(model, "URL"),
                    new ResourceModel("url", "URL"), true);
        }
       
        file.getFormComponent().add(new FileExistsValidator());
        if (fileExtensions != null && fileExtensions.length > 0) {
            file.setFileFilter(new Model(new ExtensionFileFilter(fileExtensions)));
        }
        add(file);
    }
View Full Code Here

            }
           
            // if it can be a reference to the local filesystem make sure it's valid
            FormComponent<String> fc = ((ParamPanel) tp).getFormComponent();
            if (paramName.equalsIgnoreCase("url")) {
                fc.add(new FileExistsValidator());
            }
            // make sure the proper value is returned, but don't set it for strings otherwise
            // we incur in a wicket bug (the empty string is not converter back to a null)
            // GR: it doesn't work for File neither.
            // AA: better not mess with files, the converters turn data dir relative to
View Full Code Here

TOP

Related Classes of org.geoserver.web.wicket.FileExistsValidator

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.