[ 
http://issues.apache.org/jira/browse/WICKET-59?page=comments#action_12455914 ] 
            
Martin Funk commented on WICKET-59:
-----------------------------------

Adding a:
if (Location starts with http://) {
  take it for absolute
} else {
  take it for relative
}
to the getObject method of the JavaScriptHeaderContributor is very much fine 
with me.
It also would be a little closer to the DRY Principle.

> 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
>         Assigned To: Alastair Maw
>            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