Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.SimpleAjaxLink


        } else {
            styleName = null;
        }
           
        // build and returns the link, but disable it if the style is the default
        SimpleAjaxLink link = new SimpleAjaxLink( id, new Model(styleName)) {

            @Override
            public void onClick(AjaxRequestTarget target) {
                popupWindow.setInitialHeight( 375 );
                popupWindow.setInitialWidth( 525 );
                popupWindow.setTitle(new ParamResourceModel("chooseStyle", this));
                popupWindow.setContent( new StyleListPanel( popupWindow.getContentId() ) {
                    @Override
                    protected void handleStyle(StyleInfo style, AjaxRequestTarget target) {
                        popupWindow.close( target );
                       
                        LayerGroupEntry entry = (LayerGroupEntry) itemModel.getObject();
                        entry.setStyle( style );
                       
                        //redraw
                        target.addComponent( layerTable );
                    }
                });
                popupWindow.show(target);
            }

        };
        link.getLink().setEnabled(!defaultStyle);
        return link;
    }
View Full Code Here


                if (linkLabel == null) {
                    linkLabel = locale.getDisplayName();
                }
                linkLabel = linkLabel == null ? "" : linkLabel + (" <" + locale.toString() + ">");

                return new SimpleAjaxLink(id, new Model(locale), new Model(linkLabel)) {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public void onClick(final AjaxRequestTarget target) {
                        Locale locale = (Locale) getModelObject();
View Full Code Here

        });
        return stores;
    }

    SimpleAjaxLink resourceChooserLink(String id, IModel itemModel, IModel label) {
        return new SimpleAjaxLink(id, itemModel, label) {

            @Override
            protected void onClick(AjaxRequestTarget target) {
                Resource resource = (Resource) getModelObject();
                setResponsePage(new ResourceConfigurationPage(
View Full Code Here

        ResourceModel resRemove = new ResourceModel("removeStore", "Remove");

        ParamResourceModel confirmRemove = new ParamResourceModel("confirmRemoveStoreX", this, info
                .getName());

        SimpleAjaxLink linkPanel = new ConfirmationAjaxLink(id, null, resRemove, confirmRemove) {
            public void onClick(AjaxRequestTarget target) {
                getCatalog().remove((StoreInfo) itemModel.getObject());
                target.addComponent(StorePanel.this);
            }
        };
View Full Code Here

        };
    }

    Component editRuleLink(String id, IModel itemModel, Property<ServiceAccessRule> property) {
        return new SimpleAjaxLink(id, itemModel, property.getModel(itemModel)) {

            @Override
            protected void onClick(AjaxRequestTarget target) {
                setResponsePage(new EditServiceAccessRulePage((ServiceAccessRule) getModelObject()));
            }
View Full Code Here

        };
    }

    Component editUserLink(String id, IModel itemModel, Property<User> property) {
        return new SimpleAjaxLink(id, itemModel, property.getModel(itemModel)) {

            @Override
            protected void onClick(AjaxRequestTarget target) {
                setResponsePage(new EditUserPage((UserDetails) getModelObject()));
            }
View Full Code Here

        @Override
        protected Component getComponentForProperty(String id, IModel itemModel,
                Property<StyleInfo> property) {
            final StyleInfo style = (StyleInfo) itemModel.getObject();
            if ( property == NAME ) {
                return new SimpleAjaxLink( id, NAME.getModel( itemModel ) ) {
                    @Override
                    public void onClick(AjaxRequestTarget target) {
                        handleStyle(style, target);
                    }
                };
View Full Code Here

        @Override
        protected Component getComponentForProperty(String id, final IModel itemModel,
                Property<LayerInfo> property) {
            IModel model = property.getModel( itemModel );
            if ( NAME == property ) {
                return new SimpleAjaxLink( id, model ) {
                    @Override
                    protected void onClick(AjaxRequestTarget target) {
                        LayerInfo layer = (LayerInfo) itemModel.getObject();
                        handleLayer( layer, target );
                    }
View Full Code Here

        add(dialog = new GeoServerDialog("dialog"));
        setHeaderPanel(headerPanel());
    }

    Component editRuleLink(String id, IModel itemModel, Property<DataAccessRule> property) {
        return new SimpleAjaxLink(id, itemModel, property.getModel(itemModel)) {

            @Override
            protected void onClick(AjaxRequestTarget target) {
                setResponsePage(new EditDataAccessRulePage((DataAccessRule) getModelObject()));
            }
View Full Code Here

        });
        return stores;
    }

    SimpleAjaxLink resourceChooserLink(String id, IModel itemModel, IModel label) {
        return new SimpleAjaxLink(id, itemModel, label) {

            @Override
            protected void onClick(AjaxRequestTarget target) {
                Resource resource = (Resource) getDefaultModelObject();
                setResponsePage(new ResourceConfigurationPage(
View Full Code Here

TOP

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

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.