Example usage for org.apache.wicket Component getApplication

List of usage examples for org.apache.wicket Component getApplication

Introduction

In this page you can find the example usage for org.apache.wicket Component getApplication.

Prototype

public final Application getApplication() 

Source Link

Document

Gets interface to application that this component is a part of.

Usage

From source file:org.wicketstuff.validation.client.ClientAndServerValidatingFeedbackBehavior.java

License:Apache License

@Override
public void renderHead(Component c, IHeaderResponse response) {
    super.renderHead(c, response);
    CoreLibrariesContributor.contributeAjax(c.getApplication(), response);

    // add a trigger that will add our validation to the forms' onSubmit methods
    String formID = mForm.getMarkupId();
    String containerID = mContainer.getMarkupId();
    response.render(OnLoadHeaderItem.forScript("ClientAndServerValidator.registerFeedbackContainerForForm('"
            + formID + "', '" + containerID + "');"));
}

From source file:sk.drunkenpanda.leaflet.resources.LeafletResourcesBehavior.java

License:Apache License

/**
 * {@inheritDoc }     //  w  ww. j av  a  2 s  . co  m
 */
@Override
public void renderHead(Component component, IHeaderResponse response) {
    Args.notNull(component, "component");
    Args.notNull(response, "response");

    super.renderHead(component, response);

    LeafletSettings settings = Leaflet.getSettings(component.getApplication());
    renderHead(settings, response);
}