Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.SimpleAjaxLink


            //backback to just a label
            return new Label(id, property.getModel(itemModel));
        }
   
        Component createEditLink(String id, final IModel model, Property<T> property) {
            return new SimpleAjaxLink(id, property.getModel(model)) {
   
                @Override
                protected void onClick(AjaxRequestTarget target) {
                    SecurityNamedServiceEditPage<T> editPage =
                        new SecurityNamedServiceEditPage<T>(model);
View Full Code Here


        return header;
    }

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

        });
        form.add(new BookmarkablePageLink("cancel", GeoServerHomePage.class));
    }

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

        });
        form.add(new BookmarkablePageLink("cancel", GeoServerHomePage.class));
    }

    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) getDefaultModelObject()));
            }
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

    @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

                styleName = layer.getDefaultStyle().getName();
            }
        }
           
        // 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

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

//        };
//    }

    @SuppressWarnings("unchecked")
    Component editRoleLink(String id, IModel itemModel, Property<GeoServerRole> property) {
        return new SimpleAjaxLink(id, itemModel, property.getModel(itemModel)) {

            @Override
            protected void onClick(AjaxRequestTarget target) {               
                setResponsePage(new EditRolePage(roleServiceName,
                        (GeoServerRole) getDefaultModelObject()).setReturnPage(getPage()));
View Full Code Here

        };
    }
   
    @SuppressWarnings("unchecked")
    Component editParentRoleLink(String id, IModel itemModel, Property<GeoServerRole> property) {
        return new SimpleAjaxLink(id, itemModel, property.getModel(itemModel)) {

            @Override
            protected void onClick(AjaxRequestTarget target) {
                GeoServerRole role = (GeoServerRole) getDefaultModelObject();
                GeoServerRole parentRole;
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.