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

codetroopers.wicket.web.parsley.javascript.ParsleyExtendJsReference Maven / Gradle / Ivy

package codetroopers.wicket.web.parsley.javascript;

import org.apache.wicket.markup.head.HeaderItem;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem;
import org.apache.wicket.resource.JQueryPluginResourceReference;

import java.util.ArrayList;

/**
 * Base parsley javascript reference
 *
 * @author cgatay
 */
public class ParsleyExtendJsReference extends JQueryPluginResourceReference {
    public ParsleyExtendJsReference() {
        super(ParsleyExtendJsReference.class, "parsley.extend.min.js");
    }

    @Override
    public Iterable getDependencies() {
        final JavaScriptReferenceHeaderItem parsleyJsReference = JavaScriptHeaderItem.forReference(new ParsleyJsReference());
        final Iterable parentDependencies = super.getDependencies();
        final ArrayList headerItems = new ArrayList();
        for (HeaderItem parentDependency : parentDependencies) {
            headerItems.add(parentDependency);
        }
        headerItems.add(parsleyJsReference);
        return headerItems;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy