Examples of GeoServerAjaxFormLink


Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        for (XMLGridSubset gs : model.getObject()) {
            gridSetNames.remove(gs.getGridSetName());
        }
        Collections.sort(gridSetNames);

        GeoServerAjaxFormLink addGridsubsetLink = new GeoServerAjaxFormLink("addGridSubset") {
            private static final long serialVersionUID = 1L;

            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                availableGridSets.processInput();

                final String selectedGridset = availableGridSets.getModelObject();
                if (null == selectedGridset) {
                    return;
                }

                List<String> choices = new ArrayList<String>(availableGridSets.getChoices());
                choices.remove(selectedGridset);
                availableGridSets.setChoices(choices);
                availableGridSets.setEnabled(!choices.isEmpty());

                XMLGridSubset newSubset = new XMLGridSubset();
                newSubset.setGridSetName(selectedGridset);
                grids.getModelObject().add(newSubset);

                target.addComponent(table);
                target.addComponent(availableGridSets);
            }
        };
        addGridsubsetLink.add(new Icon("addIcon", GWCIconFactory.ADD_ICON));
        add(addGridsubsetLink);

        availableGridSets = new DropDownChoice<String>("availableGridsets", new Model<String>(),
                gridSetNames);
        availableGridSets.setOutputMarkupId(true);
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        } else {
            newView = true;
        }
       
        // the links to refresh, add and remove a parameter
        form.add(new GeoServerAjaxFormLink("guessParams") {
           
            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                sqlEditor.processInput();
                parameters.processInputs();
                if (sql != null && !"".equals(sql.trim())) {
                    paramProvider.refreshFromSql(sql);
                    target.addComponent(parameters);
                }
            }
        });
        form.add(new GeoServerAjaxFormLink("addNewParam") {
           
            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                paramProvider.addParameter();
                target.addComponent(parameters);
            }
        });
        form.add(new GeoServerAjaxFormLink("removeParam") {
           
            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                paramProvider.removeAll(parameters.getSelection());
                parameters.clearSelection();
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

            }
        });
    }

    private GeoServerAjaxFormLink refreshLink() {
        return new GeoServerAjaxFormLink("refresh") {

            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                sqlEditor.processInput();
                parameters.processInputs();
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        };
    }

    Component editAttributeLink(final IModel itemModel) {
        GeoServerAjaxFormLink link = new GeoServerAjaxFormLink("link") {

            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                AttributeDescription attribute = (AttributeDescription) itemModel.getObject();
                setResponsePage(new AttributeEditPage(attribute, NewFeatureTypePage.this));
            }

        };
        link.add(new Label("name", new PropertyModel(itemModel, "name")));
        return link;
    }
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

    protected Component headerPanel() {
        Fragment header = new Fragment(HEADER_PANEL, "header", this);

        // the add button
        header.add(new GeoServerAjaxFormLink("addNew", form) {

            @Override
            public void onClick(AjaxRequestTarget target, Form form) {
                AttributeDescription attribute = new AttributeDescription();
                setResponsePage(new AttributeNewPage(attribute, NewFeatureTypePage.this));
            }
        });

        header.add(new GeoServerAjaxFormLink("removeSelected", form) {

            @Override
            public void onClick(AjaxRequestTarget target, Form form) {
                attributesProvider.removeAll(attributeTable.getSelection());
                attributeTable.clearSelection();
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

                return new DemoRequestResponse(new Model(request));
            }
        });

        // the describe coverage link
        describeLink = new GeoServerAjaxFormLink("describeCoverage") {

            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                version.processInput();
                coverage.processInput();
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        bands.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance());
        bands.setFilterable(false);
        bands.setSelectable(false);
        add(bands);

        GeoServerAjaxFormLink reload = new GeoServerAjaxFormLink("reload") {
            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                GeoServerApplication app = (GeoServerApplication) getApplication();

                try {
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        envelopePanel.setRequired(true);
        envelopePanel.setCRSFieldVisible(true);
        envelopePanel.setCrsRequired(true);
        envelopePanel.setOutputMarkupId( true );
       
        form.add(new GeoServerAjaxFormLink( "generateBounds") {
            @Override
            public void onClick(AjaxRequestTarget target, Form form) {
                // build a layer group with the current contents of the group
                LayerGroupInfo lg = getCatalog().getFactory().createLayerGroup();
                for ( LayerGroupEntry entry : lgEntryPanel.getEntries() ) {
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        attributePanel.add(attributes);
       
        // reload links
        WebMarkupContainer reloadContainer = new WebMarkupContainer("reloadContainer");
        attributePanel.add(reloadContainer);
        GeoServerAjaxFormLink reload = new GeoServerAjaxFormLink("reload") {
            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                GeoServerApplication app = (GeoServerApplication) getApplication();
               
                FeatureTypeInfo ft = (FeatureTypeInfo)getResourceInfo();
                app.getCatalog().getResourcePool().clear(ft);
                app.getCatalog().getResourcePool().clear(ft.getStore());
                target.addComponent(attributePanel);
            }
        };
        reloadContainer.add(reload);
       
        GeoServerAjaxFormLink warning = new GeoServerAjaxFormLink("reloadWarning") {
            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                reloadWarningDialog.show(target);
            }
        };
View Full Code Here

Examples of org.geoserver.web.wicket.GeoServerAjaxFormLink

        };
    }

    GeoServerAjaxFormLink computeLatLonBoundsLink(final Form refForm,
            final EnvelopePanel nativeBBox, final EnvelopePanel latLonPanel) {
        return new GeoServerAjaxFormLink("computeLatLon", refForm) {

            @Override
            protected void onClick(AjaxRequestTarget target, Form form) {
                // perform manual processing of the required fields
                nativeBBox.processInput();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.