Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.agilecoders.wicket.logging;
 
The org.apache.wicket.request.resource.JavaScriptResourceReference that represents the "clientside-logging.js".

Author(s):
miha
    private static final long serialVersionUID = 1L;

    
Singleton instance of this reference
    private static final ClientSideLoggingJavaScript INSTANCE = new ClientSideLoggingJavaScript();


    

Returns:
the single instance of the resource reference
    public static ClientSideLoggingJavaScript instance() {
        return ;
    }

    

Returns:
a new org.apache.wicket.markup.head.JavaScriptHeaderItem instance that represents this resource reference.
    public static JavaScriptHeaderItem asHeaderItem() {
        return JavaScriptHeaderItem.forReference(instance());
    }

    
Private constructor.
    private ClientSideLoggingJavaScript() {
        super(ClientSideLoggingJavaScript.class"js/clientside-logging.js");
    }
    @Override
    public Iterable<? extends HeaderItemgetDependencies() {
        final List<HeaderItemdependencies = Lists.newArrayList(super.getDependencies());
        dependencies.add(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
        dependencies.add(JavaScriptHeaderItem.forReference(WicketAjaxJQueryResourceReference.get()));
        if (ClientSideLoggingSettings.get().logStacktrace()) {
            dependencies.add(JavaScriptHeaderItem.forReference(new WebjarsJavaScriptResourceReference("stacktrace/current/stacktrace.js")));
        }
        return dependencies;
    }
New to GrepCode? Check out our FAQ X