You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "David Loidolt (Created) (JIRA)" <ji...@apache.org> on 2012/03/15 15:49:38 UTC
[jira] [Created] (WICKET-4457) setTextEncoding on
JavascriptResourceReferences/CssResourceReferences
setTextEncoding on JavascriptResourceReferences/CssResourceReferences
---------------------------------------------------------------------
Key: WICKET-4457
URL: https://issues.apache.org/jira/browse/WICKET-4457
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 1.5.4
Reporter: David Loidolt
Setting the encoding of JavascriptResources and CssResources in wicket is by now not easily to achieve.
By now only html files are equipped with the charset option afterwads, but not CSS or JS files.
Content-Type: application/javascript;charset=UTF8
org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() does take the textEncoding into account,
but there is no way to set it from the outside without introducing new classes by copy/pasting existing Resources and adapt them.
The only resource which is able to modify the content-type through the constructor is the TextTemplateResource.
One can specify "application/javascript; charset=UTF8" and pass it as the content-type parameter.
It's a hack, but this string then used for the content-type header.
A separate charset parameter would be better in my opinion.
UserGroup post: http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-td4472204.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4457) setTextEncoding on
JavascriptResourceReferences/CssResourceReferences
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl updated WICKET-4457:
-------------------------------
Affects Version/s: 6.0.0-beta1
> setTextEncoding on JavascriptResourceReferences/CssResourceReferences
> ---------------------------------------------------------------------
>
> Key: WICKET-4457
> URL: https://issues.apache.org/jira/browse/WICKET-4457
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5.4, 6.0.0-beta1
> Reporter: David Loidolt
> Assignee: Peter Ertl
>
> Setting the encoding of JavascriptResources and CssResources in wicket is by now not easily to achieve.
> By now only html files are equipped with the charset option afterwads, but not CSS or JS files.
> Content-Type: application/javascript;charset=UTF8
> org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() does take the textEncoding into account,
> but there is no way to set it from the outside without introducing new classes by copy/pasting existing Resources and adapt them.
> The only resource which is able to modify the content-type through the constructor is the TextTemplateResource.
> One can specify "application/javascript; charset=UTF8" and pass it as the content-type parameter.
> It's a hack, but this string then used for the content-type header.
> A separate charset parameter would be better in my opinion.
> UserGroup post: http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-td4472204.html
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (WICKET-4457) setTextEncoding on
JavascriptResourceReferences/CssResourceReferences
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl reassigned WICKET-4457:
----------------------------------
Assignee: Peter Ertl
> setTextEncoding on JavascriptResourceReferences/CssResourceReferences
> ---------------------------------------------------------------------
>
> Key: WICKET-4457
> URL: https://issues.apache.org/jira/browse/WICKET-4457
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5.4
> Reporter: David Loidolt
> Assignee: Peter Ertl
>
> Setting the encoding of JavascriptResources and CssResources in wicket is by now not easily to achieve.
> By now only html files are equipped with the charset option afterwads, but not CSS or JS files.
> Content-Type: application/javascript;charset=UTF8
> org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() does take the textEncoding into account,
> but there is no way to set it from the outside without introducing new classes by copy/pasting existing Resources and adapt them.
> The only resource which is able to modify the content-type through the constructor is the TextTemplateResource.
> One can specify "application/javascript; charset=UTF8" and pass it as the content-type parameter.
> It's a hack, but this string then used for the content-type header.
> A separate charset parameter would be better in my opinion.
> UserGroup post: http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-td4472204.html
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4457) setTextEncoding on
JavascriptResourceReferences/CssResourceReferences
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270064#comment-13270064 ]
Peter Ertl commented on WICKET-4457:
------------------------------------
sample (wicket 1.5.x)
JavaScriptResourceReference reference = new JavaScriptResourceReference(Home.class, "foo.js")
{
@Override
public IResource getResource()
{
PackageResource resource = (PackageResource)super.getResource();
resource.setTextEncoding("ISO-8859-1");
return resource;
}
};
sample (wicket 6.x, no cast need like in 1.5.x):
JavaScriptResourceReference reference = new JavaScriptResourceReference(Home.class, "foo.js")
{
@Override
public JavaScriptPackageResource getResource()
{
JavaScriptPackageResource resource = super.getResource();
resource.setTextEncoding("ISO-8859-1");
return resource;
}
};
> setTextEncoding on JavascriptResourceReferences/CssResourceReferences
> ---------------------------------------------------------------------
>
> Key: WICKET-4457
> URL: https://issues.apache.org/jira/browse/WICKET-4457
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5.4, 6.0.0-beta1
> Reporter: David Loidolt
> Assignee: Peter Ertl
> Fix For: 6.0.0-beta1, 1.5.7
>
>
> Setting the encoding of JavascriptResources and CssResources in wicket is by now not easily to achieve.
> By now only html files are equipped with the charset option afterwads, but not CSS or JS files.
> Content-Type: application/javascript;charset=UTF8
> org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() does take the textEncoding into account,
> but there is no way to set it from the outside without introducing new classes by copy/pasting existing Resources and adapt them.
> The only resource which is able to modify the content-type through the constructor is the TextTemplateResource.
> One can specify "application/javascript; charset=UTF8" and pass it as the content-type parameter.
> It's a hack, but this string then used for the content-type header.
> A separate charset parameter would be better in my opinion.
> UserGroup post: http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-td4472204.html
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4457) setTextEncoding on
JavascriptResourceReferences/CssResourceReferences
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl resolved WICKET-4457.
--------------------------------
Resolution: Fixed
Fix Version/s: 6.0.0-beta1
1.5.7
> setTextEncoding on JavascriptResourceReferences/CssResourceReferences
> ---------------------------------------------------------------------
>
> Key: WICKET-4457
> URL: https://issues.apache.org/jira/browse/WICKET-4457
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5.4, 6.0.0-beta1
> Reporter: David Loidolt
> Assignee: Peter Ertl
> Fix For: 1.5.7, 6.0.0-beta1
>
>
> Setting the encoding of JavascriptResources and CssResources in wicket is by now not easily to achieve.
> By now only html files are equipped with the charset option afterwads, but not CSS or JS files.
> Content-Type: application/javascript;charset=UTF8
> org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() does take the textEncoding into account,
> but there is no way to set it from the outside without introducing new classes by copy/pasting existing Resources and adapt them.
> The only resource which is able to modify the content-type through the constructor is the TextTemplateResource.
> One can specify "application/javascript; charset=UTF8" and pass it as the content-type parameter.
> It's a hack, but this string then used for the content-type header.
> A separate charset parameter would be better in my opinion.
> UserGroup post: http://apache-wicket.1842946.n4.nabble.com/setTextEncoding-on-JavascriptResourceReferences-CssResourceReferences-td4472204.html
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira