Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.CodeMirrorEditor


        urlTextField = new TextField("url", new PropertyModel(requestModel, "requestUrl"));
        urlTextField.setMarkupId("requestUrl");
        urlTextField.setOutputMarkupId(true);
        demoRequestsForm.add(urlTextField);

        body = new CodeMirrorEditor("body", new PropertyModel(requestModel, "requestBody"));
        // force the id otherwise this blasted thing won't be usable from other forms
        // body.setMarkupId("requestBody");
        // body.setOutputMarkupId(true);
        body.setTextAreaMarkupId("requestBody");
        //body.add(new EditAreaBehavior());
View Full Code Here


        add(styleForm);

        styleForm.add(nameTextField = new TextField("name"));
        nameTextField.setRequired(true);
       
        styleForm.add( editor = new CodeMirrorEditor("editor", new PropertyModel(this, "rawSLD")) );
        // force the id otherwise this blasted thing won't be usable from other forms
        editor.setTextAreaMarkupId("editor");
        editor.setOutputMarkupId(true);
        styleForm.add(editor);
View Full Code Here

        // Get List of script extensions from installed plugins
        final List<String> extensions = getExtensions();

        // Content
        String mode = extensions.size() > 0 ? getModeFromExtension(extensions.get(0)) : "py";
        final CodeMirrorEditor content = new CodeMirrorEditor("contents", mode, new PropertyModel(script, "contents"));
        content.setRequired(true);
        form.add(content);

        // Name
        TextField name = new TextField("name", new PropertyModel(script, "name"));
        name.setRequired(true);
        form.add(name);

        // Type
        DropDownChoice<String> typeDropDownChoice = new DropDownChoice<String>("type",
                new PropertyModel(script, "type"), new LoadableDetachableModel<List<String>>() {
                    @Override
                    protected List<String> load() {
                        List<String> values = Lists.newArrayList();
                        for (ScriptType type : ScriptType.values()) {
                            values.add(type.getLabel());
                        }
                        return values;
                    }
                });
        typeDropDownChoice.setRequired(true);
        form.add(typeDropDownChoice);

        // Extension
        final DropDownChoice<String> extensionDropDownChoice = new DropDownChoice<String>("extension",
            new PropertyModel(script, "extension"),
            new LoadableDetachableModel<List<String>>() {
                @Override
                protected List<String> load() {
                    return extensions;
                }
            }
        );
        extensionDropDownChoice.setRequired(true);
        extensionDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                int i = Integer.parseInt(extensionDropDownChoice.getValue());
                String ext = extensions.get(i);
                String mode = getModeFromExtension(ext);
                content.setMode(mode);
            }
        });
        form.add(extensionDropDownChoice);

        SubmitLink submitLink = new SubmitLink("submit", form);
View Full Code Here

        form.add(extension);

        // Content
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        String mode = scriptManager.lookupPluginEditorMode(script.getFile());
        CodeMirrorEditor content = new CodeMirrorEditor("contents", mode, new PropertyModel(scriptModel, "contents"));
        content.setRequired(true);
        form.add(content);

        // Dialog
        add(dialog = new GeoServerDialog("dialog"));
View Full Code Here

        formatReadOnlyMessage = new WebMarkupContainer("formatReadOnly", new Model());
        formatReadOnlyMessage.setVisible(false);
        styleForm.add(formatReadOnlyMessage);

        styleForm.add( editor = new CodeMirrorEditor("styleEditor", new PropertyModel(this, "rawStyle")) );
        // force the id otherwise this blasted thing won't be usable from other forms
        editor.setTextAreaMarkupId("editor");
        editor.setOutputMarkupId(true);
        editor.setRequired(true);
        styleForm.add(editor);
View Full Code Here

        urlTextField = new TextField("url", new PropertyModel(requestModel, "requestUrl"));
        urlTextField.setMarkupId("requestUrl");
        urlTextField.setOutputMarkupId(true);
        demoRequestsForm.add(urlTextField);

        body = new CodeMirrorEditor("body", new PropertyModel(requestModel, "requestBody"));
        // force the id otherwise this blasted thing won't be usable from other forms
        // body.setMarkupId("requestBody");
        // body.setOutputMarkupId(true);
        body.setTextAreaMarkupId("requestBody");
        //body.add(new EditAreaBehavior());
View Full Code Here

TOP

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

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.