Package org.geoserver.web.data.workspace

Examples of org.geoserver.web.data.workspace.WorkspaceEditPage$Settings


            if(select2Field == null) {
                entityLink.setRequired(getModel().isRequired());
                select2Field = Select2ChoiceUtil.newSelect2Choice(ID_AUTO_COMPLETE, model, getModel());
                setProviderAndCurrAndPending(select2Field, getModel().getActionArgsHint());
                if(!getModel().hasChoices()) {
                    final Settings settings = select2Field.getSettings();
                    final int minLength = getModel().getAutoCompleteMinLength();
                    settings.setMinimumInputLength(minLength);
                    settings.setPlaceholder(getModel().getName());
                }
                entityLink.addOrReplace(select2Field);
            } else {
                //
                // the select2Field already exists, so the widget has been rendered before.  If it is
View Full Code Here


                    }
                    setResponsePage(EntityPage.class, selectedModel.getPageParameters());
                }
            });
       
        final Settings settings = breadcrumbChoice.getSettings();
        settings.setMinimumInputLength(0);
        settings.setWidth("100%");
       
        breadcrumbChoice.setProvider(new TextChoiceProvider<EntityModel>() {

            private static final long serialVersionUID = 1L;
View Full Code Here

        if(select2Field == null) {
            select2Field = new Select2Choice<ObjectAdapterMemento>(ID_AUTO_COMPLETE, model);
            setProviderAndCurrAndPending(select2Field, getScalarModel().getActionArgsHint());
            if(!getScalarModel().hasChoices()) {
                final Settings settings = select2Field.getSettings();
                ScalarModel scalarModel = getScalarModel();
                final int minLength = scalarModel.getAutoCompleteMinLength();
                settings.setMinimumInputLength(minLength);
                settings.setPlaceholder(scalarModel.getName());
            }
            addOrReplace(select2Field);
        } else {
            //
            // the select2Field already exists, so the widget has been rendered before.  If it is
View Full Code Here

    }

    @Test
    public void testExpressionSettingOnWorkSpace() {
        // Opening the selected page
        tester.startPage(new WorkspaceEditPage(citeWorkspace));
        tester.assertRenderedPage(WorkspaceEditPage.class);
        tester.assertNoErrorMessage();

        // Setting of the "settings" parameter to true
        FormTester form = tester.newFormTester("form");
        form.setValue("settings:enabled", true);
        form.submit();
        // Check if no error has been found
        tester.assertNoErrorMessage();
        // Get GeoServer object for retrieving the settings associated to the workspace
        GeoServer gs = getGeoServer();
        assertNotNull(gs.getSettings(citeWorkspace));
        // Reload the page
        tester.startPage(new WorkspaceEditPage(citeWorkspace));
        tester.assertRenderedPage(WorkspaceEditPage.class);

        // CQL expression
        String expression = "stringTemplate(path, '(\\w{4})_(\\w{7})_(\\d{3})_(\\d{4})(\\d{2})(\\d{2})T(\\d{7})_(\\d{2})\\.(\\w{4})', "
                + "'/${1}/${4}/${5}/${6}/${0}')";
View Full Code Here

    }

    @Test
    public void testRootSettingOnWorkSpace() {
        // Opening the selected page
        tester.startPage(new WorkspaceEditPage(citeWorkspace));
        tester.assertRenderedPage(WorkspaceEditPage.class);
        tester.assertNoErrorMessage();

        // Setting of the "settings" parameter to true
        FormTester form = tester.newFormTester("form");
        form.setValue("settings:enabled", true);
        form.submit();
        // Check if no error has been found
        tester.assertNoErrorMessage();
        // Get GeoServer object for retrieving the settings associated to the workspace
        GeoServer gs = getGeoServer();
        assertNotNull(gs.getSettings(citeWorkspace));
        // Reload the page
        tester.startPage(new WorkspaceEditPage(citeWorkspace));
        tester.assertRenderedPage(WorkspaceEditPage.class);

        // Selection of the root directory
        String root = getTestData().getDataDirectoryRoot().getAbsolutePath();
        // Set the root directory
View Full Code Here

TOP

Related Classes of org.geoserver.web.data.workspace.WorkspaceEditPage$Settings

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.