Hi Jeremy,

Thanks for the implementation ( I've found that you're the author of most of
the files :) ) - it will be really useful in the future.

1st problem I ran into - no usage example in Javadocs :) However, mailing
list helped!
... after that
I've found that one of the core WiQuery classes renders javascript with
response.renderString method (
org.wicketstuff.jquery.JQueryBehavior.renderHead(IHeaderResponse) ):

    @Override
    public void renderHead(IHeaderResponse response) {
        try {
            super.renderHead(response);
            if(getIncludeJQueryJS(response)) {
                    response.renderJavascriptReference(JQUERY_JS);
                    if
(Application.DEVELOPMENT.equals(Application.get().getConfigurationType())) {
                        response.renderJavascriptReference(JQUERY_DEBUG_JS);
                    }
            }
            CharSequence script = getOnReadyScript();
            if ((script != null) && (script.length() > 0)) {
                StringBuilder builder = new StringBuilder();
                builder.append("<script
type=\"text/javascript\">\n$(document).ready(function(){\n");
                builder.append(script);
                builder.append("\n});</script>");
                response.renderString(builder.toString());
            }
        } catch (RuntimeException exc) {
            throw exc;
        } catch (Exception exc) {
            throw new RuntimeException("wrap: " + exc.getMessage(), exc);
        }
    }


Which is not being filtered and gets into header - which causes the
"$('document')" string to be not valid before jquery.js was loaded.

Basic features looks good and definitely a good start!

Probably I'll need more examples how to use
"AbstractResourceDependentResourceReference" to create JS Reference
dependencies and make sure the order is all right.

Thank you once again!

-----
--------------------
nothing is impossible
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/usage-of-JavascriptFilteredIntoFooterHeaderResponse-tp3302046p3304493.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to