You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by trsvax <tr...@gmail.com> on 2013/01/14 14:33:18 UTC

5.4-alpha-2 jQuery support solution and another question

After removing most of the code from the project I found the line that causes
prototype to be included. If I SymbolConstants.APPLICATION_VERSION contains
'-SNAPSHOT' I get prototype.

So this includes prototype and dom.js is the prototype version

public class AppModule
{
   @Contribute(SymbolProvider.class)
    @ApplicationDefaults
    public static void
contributeApplicationDefaults(MappedConfiguration<String, Object>
configuration) {   
       configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
"jquery");

        configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
        configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
        configuration.add(SymbolConstants.APPLICATION_VERSION,
"0.0.1-SNAPSHOT");        
       configuration.add(SymbolConstants.HMAC_PASSPHRASE,"test");       
     }
     
    @Contribute(Compatibility.class)
    public static void disableScriptaculous(MappedConfiguration<Trait,
Boolean> configuration) {
    	configuration.add(Trait.SCRIPTACULOUS, false);
        configuration.add(Trait.INITIALIZERS, false);
    }
}

This does not include prototype and dom.js is the jquery version

public class AppModule
{
   @Contribute(SymbolProvider.class)
    @ApplicationDefaults
    public static void
contributeApplicationDefaults(MappedConfiguration<String, Object>
configuration) {   
       configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
"jquery");

        configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
        configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
        configuration.add(SymbolConstants.APPLICATION_VERSION, "0.0.1");        
       configuration.add(SymbolConstants.HMAC_PASSPHRASE,"test");       
     }
     
    @Contribute(Compatibility.class)
    public static void disableScriptaculous(MappedConfiguration<Trait,
Boolean> configuration) {
    	configuration.add(Trait.SCRIPTACULOUS, false);
        configuration.add(Trait.INITIALIZERS, false);
    }
}

I'm guessing this is not a feature? This release is very interesting and now
that I have it working I'll report my comments later this week.

Thanks
Barry



--
View this message in context: http://tapestry.1045711.n5.nabble.com/5-4-alpha-2-jQuery-support-solution-and-another-question-tp5719299.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.4-alpha-2 jQuery support solution and another question

Posted by trsvax <tr...@gmail.com>.
It turns out dom.js was being cached. What makes this tricky to figure out is
requirejs apparently adds the script tags to the DOM which makes it appear
prototype.js is being added by Tapestry when in fact it's being included by
the cached dom.js. 

I'm looking forward to checksums in asset paths.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/5-4-alpha-2-jQuery-support-solution-and-another-question-tp5719299p5719321.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.4-alpha-2 jQuery support solution and another question

Posted by Howard Lewis Ship <hl...@gmail.com>.
Often, the JavaScript cached in the browser is the issue, not the HTML
markup.

On Mon, Jan 14, 2013 at 1:01 PM, trsvax <tr...@gmail.com> wrote:

> I'll restest this when I get home but I'm pretty sure this is it. I did not
> believe it either so I tried a few times. Also I don't think it's a cache
> issue. The generated HTML changes
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/5-4-alpha-2-jQuery-support-solution-and-another-question-tp5719299p5719311.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: 5.4-alpha-2 jQuery support solution and another question

Posted by trsvax <tr...@gmail.com>.
I'll restest this when I get home but I'm pretty sure this is it. I did not
believe it either so I tried a few times. Also I don't think it's a cache
issue. The generated HTML changes 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/5-4-alpha-2-jQuery-support-solution-and-another-question-tp5719299p5719311.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.4-alpha-2 jQuery support solution and another question

Posted by François Facon <fr...@atos.net>.
Must be a client side cache effect.
I have already had this kind of problem while doing the monkey between
differents tapestry version on a Tapestry5-jQuery demo application.
This option could be validated by clearing the browser cache or by
upgrade application version to 0.0.2-SNAPSHOT.

2013/1/14 Howard Lewis Ship <hl...@gmail.com>:
> I strongly suspect it is something else; Tapestry doesn't do anything with
> the APPLICATION_VERSION but embed it into some URLs.
>
>
> On Mon, Jan 14, 2013 at 5:33 AM, trsvax <tr...@gmail.com> wrote:
>
>> After removing most of the code from the project I found the line that
>> causes
>> prototype to be included. If I SymbolConstants.APPLICATION_VERSION contains
>> '-SNAPSHOT' I get prototype.
>>
>> So this includes prototype and dom.js is the prototype version
>>
>> public class AppModule
>> {
>>    @Contribute(SymbolProvider.class)
>>     @ApplicationDefaults
>>     public static void
>> contributeApplicationDefaults(MappedConfiguration<String, Object>
>> configuration) {
>>
>>  configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
>> "jquery");
>>
>>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
>>         configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
>>         configuration.add(SymbolConstants.APPLICATION_VERSION,
>> "0.0.1-SNAPSHOT");
>>        configuration.add(SymbolConstants.HMAC_PASSPHRASE,"test");
>>      }
>>
>>     @Contribute(Compatibility.class)
>>     public static void disableScriptaculous(MappedConfiguration<Trait,
>> Boolean> configuration) {
>>         configuration.add(Trait.SCRIPTACULOUS, false);
>>         configuration.add(Trait.INITIALIZERS, false);
>>     }
>> }
>>
>> This does not include prototype and dom.js is the jquery version
>>
>> public class AppModule
>> {
>>    @Contribute(SymbolProvider.class)
>>     @ApplicationDefaults
>>     public static void
>> contributeApplicationDefaults(MappedConfiguration<String, Object>
>> configuration) {
>>
>>  configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
>> "jquery");
>>
>>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
>>         configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
>>         configuration.add(SymbolConstants.APPLICATION_VERSION, "0.0.1");
>>        configuration.add(SymbolConstants.HMAC_PASSPHRASE,"test");
>>      }
>>
>>     @Contribute(Compatibility.class)
>>     public static void disableScriptaculous(MappedConfiguration<Trait,
>> Boolean> configuration) {
>>         configuration.add(Trait.SCRIPTACULOUS, false);
>>         configuration.add(Trait.INITIALIZERS, false);
>>     }
>> }
>>
>> I'm guessing this is not a feature? This release is very interesting and
>> now
>> that I have it working I'll report my comments later this week.
>>
>> Thanks
>> Barry
>>
>>
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/5-4-alpha-2-jQuery-support-solution-and-another-question-tp5719299.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.4-alpha-2 jQuery support solution and another question

Posted by Howard Lewis Ship <hl...@gmail.com>.
I strongly suspect it is something else; Tapestry doesn't do anything with
the APPLICATION_VERSION but embed it into some URLs.


On Mon, Jan 14, 2013 at 5:33 AM, trsvax <tr...@gmail.com> wrote:

> After removing most of the code from the project I found the line that
> causes
> prototype to be included. If I SymbolConstants.APPLICATION_VERSION contains
> '-SNAPSHOT' I get prototype.
>
> So this includes prototype and dom.js is the prototype version
>
> public class AppModule
> {
>    @Contribute(SymbolProvider.class)
>     @ApplicationDefaults
>     public static void
> contributeApplicationDefaults(MappedConfiguration<String, Object>
> configuration) {
>
>  configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
> "jquery");
>
>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
>         configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
>         configuration.add(SymbolConstants.APPLICATION_VERSION,
> "0.0.1-SNAPSHOT");
>        configuration.add(SymbolConstants.HMAC_PASSPHRASE,"test");
>      }
>
>     @Contribute(Compatibility.class)
>     public static void disableScriptaculous(MappedConfiguration<Trait,
> Boolean> configuration) {
>         configuration.add(Trait.SCRIPTACULOUS, false);
>         configuration.add(Trait.INITIALIZERS, false);
>     }
> }
>
> This does not include prototype and dom.js is the jquery version
>
> public class AppModule
> {
>    @Contribute(SymbolProvider.class)
>     @ApplicationDefaults
>     public static void
> contributeApplicationDefaults(MappedConfiguration<String, Object>
> configuration) {
>
>  configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
> "jquery");
>
>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
>         configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
>         configuration.add(SymbolConstants.APPLICATION_VERSION, "0.0.1");
>        configuration.add(SymbolConstants.HMAC_PASSPHRASE,"test");
>      }
>
>     @Contribute(Compatibility.class)
>     public static void disableScriptaculous(MappedConfiguration<Trait,
> Boolean> configuration) {
>         configuration.add(Trait.SCRIPTACULOUS, false);
>         configuration.add(Trait.INITIALIZERS, false);
>     }
> }
>
> I'm guessing this is not a feature? This release is very interesting and
> now
> that I have it working I'll report my comments later this week.
>
> Thanks
> Barry
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/5-4-alpha-2-jQuery-support-solution-and-another-question-tp5719299.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com