tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daiuchuu Ginga <daiuchuu.gi...@gmail.com>
Subject Re: Ringo commented on http://tapestry.apache.org/index.html
Date Sun, 27 Mar 2016 10:44:26 GMT
If you're using Tap 5.4 it's already implemented in tapestry require.js
module (META-INF/assets/tapestry5/require.js):

req.createNode = function (config, moduleName, url) {
        var node = config.xhtml ?
                document.createElementNS('http://www.w3.org/1999/xhtml',
'html:script') :
                document.createElement('script');
        node.type = config.scriptType || 'text/javascript';
        node.charset = 'utf-8';
        node.async = true;
        return node;
    };

but there is "utf-8" is hardcoded.

2016-03-27 7:40 GMT+04:00 <no-reply@comments.apache.org>:

> Hello,
>     Ringo has commented on http://tapestry.apache.org/index.html.
>     You can find the comment here:
>     http://tapestry.apache.org/index.html#comment_5239
>     Please note that if the comment contains a hyperlink, it must be
> approved
>     before it is shown on the site.
>
>     Below is the reply that was posted:
>     ~~~~
>     HI , thank you for your helpã002
> my english is not very wellã002
> here is the problemïF1B
>
> when my page class like this
>
> package com.rahwind.jjw.pages.login.xhhc;
> @Import(library = { "IdentityVerify.js" })
> public class IdentityVerify extends BaseComponents {
> }
>
> after it render done,html will like this
> <script type="text/javascript"
> src="/assets/1.0-SNAPSHOT/app/pages/login/xhhc/IdentityVerify.js"></script>
>
> ButïF0CI want it like this
> <script type="text/javascript" charset="gbk"
> src="/assets/1.0-SNAPSHOT/app/pages/login/xhhc/IdentityVerify.js"></script>
>
> Which means in my program ïF0CI need to specify their charset when i
> import a JS file.
>
> How to do that ???
>
> for now ,I write directly in the IdentityVerify.TML file.
> <script
> src="${rootPath}/assets/1.0-SNAPSHOT/app/pages/login/xhhc/IdentityVerify.js"
> charset="gbk" type="text/javascript" />
>
> But I know it's a wrong solutionã002
> please help meïF0Cany hint will be greatã002ThanksïF01
>     ~~~~
>
>     With regards,
>     The Apache Tapestry Project.
>
>     You are receiving this email because you have subscribed to changes
> for the tapestry site.
>     To stop receiving these emails, unsubscribe from the mailing list that
> is providing these notifications.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message