All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wicketstuff.jwicket.ComponentFinder Maven / Gradle / Ivy

Go to download

WicketJQuery by Stefan Lindner has been renamed to jWicket, mavenized, and migrated to WicketStuff. This Wicketstuff version supercedes the original version which was available at http://subversion.visionet.de/project/WicketJQuery/wiki

There is a newer version: 9.7.0
Show newest version
package org.wicketstuff.jwicket;

import org.apache.wicket.Component;
import org.apache.wicket.util.visit.IVisit;
import org.apache.wicket.util.visit.IVisitor;

import java.io.Serializable;


/**
 * Find a page's child component by it's markup id
 */
public class ComponentFinder implements IVisitor, Serializable {
    private static final long serialVersionUID = 1L;

    private final String markupId;

    public ComponentFinder(String markupId) {
        this.markupId = markupId;
    }

    @Override
    public void component(Component component, IVisit visit) {
        if (component.getMarkupId().equals(getMarkupId())) {
            visit.stop(component);
        }
    }

    private String getMarkupId() {
        return this.markupId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy