[ 
http://issues.apache.org/jira/browse/WICKET-59?page=comments#action_12455744 ] 
            
Alastair Maw commented on WICKET-59:
------------------------------------

If you merely want to put in a ?key=foo on the end, I think you can already do 
that with HeaderContributor.forJavaScript(String location). Just add in your 
extra params, and it should all work. This of course assumes you want things 
relative to the webapp context.

If you wish to refer to an external JS URL which lives on another server, we 
don't currently support that. We could special case the above function, so if 
location starts with "http://"; we don't add the context path.

This should allow you to refer to any URL relative to the webapp directory 
including GET param suffixes, and any external JS URL. The one thing it won't 
make easy is referring to JS running in another context on the same app server, 
but I think that's rather special case, and can be got around with some config 
to tell the app what the URL for that is, and using a full HTTP URL.

What do you think?

> Variation of JavaScriptHeaderContributor: ExternalJavaScriptHeaderContributor
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-59
>                 URL: http://issues.apache.org/jira/browse/WICKET-59
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 2.0, 1.3, 1.2.4
>            Reporter: Martin Funk
>            Priority: Minor
>         Attachments: patch.txt
>
>
> Where JavaScriptHeaderContributor contributes a reference to a javascript 
> file relative to the context,  ExternalJavaScriptHeaderContributor allows 
> references to any javascript files just as long as the reference is 
> recognized by the 'src' attribute of the <script> element.
> This is not really an extension, rather a 'down'tesnsion since 
> ExternalJavaScriptHeaderContributor equals (JavaScriptHeaderContributor - the 
> lines of code that prepend the getContextPath to the given reference).
> mf

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to