Package org.apache.wicket.ajax.markup.html

Examples of org.apache.wicket.ajax.markup.html.AjaxLink


        form.add(hostname);
        form.setMarkupId("mainForm");
        add(form);

       
        AjaxLink cancelLink = new AjaxLink( "cancel" ) {
            @Override
            public void onClick(AjaxRequestTarget target) {
                setResponsePage( ProxyAdminPage.class );
            }
        };
View Full Code Here


        info.add(bar = new Label("bar", "0"));
        widthModel = new Model("width: 0%;");
        bar.add(new AttributeModifier("style", widthModel));
        info.add(percentage = new Label("percentage", "0"));
        info.add(currentFile = new Label("currentFile", ""));
        info.add(new AjaxLink("cancel") {

            @Override
            public void onClick(AjaxRequestTarget target) {
                FeatureTypeImporter importer = getImporter();
                importer.cancel();
View Full Code Here

        link.add(label = new Label("label", labelModel));
    }

   
    protected AjaxLink buildAjaxLink(IModel linkModel) {
        return new AjaxLink("link", linkModel) {

            @Override
            public void onClick(AjaxRequestTarget target) {
                SimpleAjaxLink.this.onClick(target);
            }
View Full Code Here

                // build a sortable link if the property is sortable, a label otherwise
                IModel titleModel = getPropertyTitle(property);
                if (property.getComparator() != null) {
                    Fragment f = new Fragment("header", "sortableHeader", item);
                    AjaxLink link = sortLink(dataProvider, item);
                    link.add(new Label("label", titleModel));
                    f.add(link);
                    item.add(f);
                } else {
                    item.add(new Label("header", titleModel));
                }
View Full Code Here

    /**
     * Builds a sort link that will force sorting on a certain column, and flip it to the other
     * direction when clicked again
     */
    AjaxLink sortLink(final GeoServerDataProvider<T> dataProvider, ListItem item) {
        return new AjaxLink("link", item.getModel()) {

            @Override
            public void onClick(AjaxRequestTarget target) {
                SortParam currSort = dataProvider.getSort();
                Property<T> property = (Property<T>) getModelObject();
View Full Code Here

        this.confirm = confirm;
    }

    @Override
    protected AjaxLink buildAjaxLink(IModel linkModel) {
        return new AjaxLink("link", linkModel) {

            @Override
            protected IAjaxCallDecorator getAjaxCallDecorator() {
                return new AjaxPreprocessingCallDecorator(super
                        .getAjaxCallDecorator()) {
View Full Code Here

                }
                target.addComponent(wktLink);
            }
        });
       
        findLink = new AjaxLink( "find" ) {
            @Override
            public void onClick(AjaxRequestTarget target) {
                popupWindow.setContent(srsListPanel());
                popupWindow.setTitle(new ParamResourceModel("selectSRS", CRSPanel.this));
                popupWindow.show(target);
View Full Code Here

     * Link that will forward to the {@link DialogDelegate}
     *
     * @return
     */
    Component cancelLink() {
        return new AjaxLink("cancel") {

            @Override
            public void onClick(AjaxRequestTarget target) {
                if (delegate.onCancel(target)) {
                    window.close(target);
View Full Code Here

                url.add(new UrlValidator());
                url.setRequired(true);
                urlBorder.add(url);
               
                // remove link
                AjaxLink link = new AjaxLink("removeLink", item.getModel()) {

                    @Override
                    public void onClick(AjaxRequestTarget target) {
                        ResourceInfo ri = (ResourceInfo) resourceModel.getObject();
                        ri.getMetadataLinks().remove(getModelObject());
                        updateLinksVisibility();
                        target.addComponent(container);
                    }
                   
                };
                item.add(link);
            }

        };
        // this is necessary to avoid loosing item contents on edit/validation checks
        links.setReuseItems(true);
        table.add(links);
       
        // the no metadata links label
        noMetadata = new Label("noLinks", new ResourceModel("noMetadataLinksSoFar"));
        container.add(noMetadata);
        updateLinksVisibility();
       
        // add new link button
        AjaxButton button = new AjaxButton("addlink") {

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form form) {
                ResourceInfo ri = (ResourceInfo) resourceModel.getObject();
                MetadataLinkInfo link = ri.getCatalog().getFactory().createMetadataLink();;
                link.setMetadataType(LINK_TYPES.get(0));
                link.setType("text/plain");
                ri.getMetadataLinks().add(link);
                updateLinksVisibility();
               
                target.addComponent(container);
            }
View Full Code Here

        return header;
    }

    AjaxLink addRuleLink() {
        return new AjaxLink("addRule", new Model()) {

            @Override
            public void onClick(AjaxRequestTarget target) {
                setResponsePage(new NewServiceAccessRulePage());
            }
View Full Code Here

TOP

Related Classes of org.apache.wicket.ajax.markup.html.AjaxLink

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.