Example usage for org.apache.wicket.extensions.ajax.markup.html IndicatingAjaxFallbackLink IndicatingAjaxFallbackLink

List of usage examples for org.apache.wicket.extensions.ajax.markup.html IndicatingAjaxFallbackLink IndicatingAjaxFallbackLink

Introduction

In this page you can find the example usage for org.apache.wicket.extensions.ajax.markup.html IndicatingAjaxFallbackLink IndicatingAjaxFallbackLink.

Prototype

public IndicatingAjaxFallbackLink(final String id, final IModel<T> model) 

Source Link

Document

Constructor

Usage

From source file:de.jetwick.ese.ui.LabeledLink.java

License:Apache License

public LabeledLink(String id, Model model, Model labelModel, boolean ajaxified) {
    super(id);/*from w w  w  . j av a 2s.c o  m*/

    Link link;
    if (ajaxified) {
        link = new IndicatingAjaxFallbackLink("linkId", model) {

            @Override
            public void onClick(AjaxRequestTarget target) {
                LabeledLink.this.onClick(target);
            }
        };
    } else
        link = new Link("linkId", model) {

            @Override
            public void onClick() {
                LabeledLink.this.onClick(null);
            }
        };
    add(link.add(new Label("labelId", labelModel)));
}

From source file:org.geoserver.web.wicket.browser.FileBreadcrumbs.java

License:Open Source License

public FileBreadcrumbs(String id, IModel rootFile, IModel currentFile) {
    super(id, currentFile);

    this.rootFile = rootFile;
    add(new ListView("path", new BreadcrumbModel(rootFile, currentFile)) {

        @Override/*w  w  w.j  a v a2s.  c  o  m*/
        protected void populateItem(ListItem item) {
            File file = (File) item.getModelObject();
            boolean last = item.getIndex() == getList().size() - 1;

            // the link to the current path item
            Label name = new Label("pathItem", file.getName() + "/");
            Link link = new IndicatingAjaxFallbackLink("pathItemLink", item.getModel()) {

                @Override
                public void onClick(AjaxRequestTarget target) {
                    pathItemClicked((File) getModelObject(), target);
                }

            };
            link.add(name);
            item.add(link);
            link.setEnabled(!last);
        }

    });
}