Hi Lenny,

if you have a look at
https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/services/javascript/JQueryJavaScriptStack.java

you will see that then SUPPRESS_PROTOTYPE is equal to false, we just
use the default js modules provided by tapestry. That mean prototype
manage the $ and all the default js object provided by Tapestry (zone,
formhandler, datefield etc...).

Every time we add a new jQuery component to the list,
we create a new jQuery plugin to let jQuery manage the $ inside the plugin.

plugin is some thing like (function($) { /* some code that uses $ */ })(jQuery)

see for example
https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/assets/components/jeditable/jeditable.js

by following this simple concept of isolation T5 object should just
work even if some a using prototype and others use jQuery.

Regards
François

2012/3/30 Lenny Primak <lpri...@hope.nyc.ny.us>:
> Thanks for your info.
> Is there a way that my components work with either prototype or jquery or is 
> this a non-starter?
> Depending on whether jquery model is installed?
>
> What should be my strategy if I have a custom component library?
>
>
> On Mar 30, 2012, at 2:54 AM, Emmanuel DEMEY <demey.emman...@gmail.com> wrote:
>
>> With Tapestry5-jQuery, we have overriden just few Component classes, most
>> of the time for using JSON format (Autocomplete and Palette).
>>
>> But all the JavaScript have been translated to jQuery, in order to create a
>> full jQuery application.
>>
>> But, if you have old Prototype-based components/mixins, all your custom and
>> Tapestry-core components will use the Prototype JavaScript library. Your
>> custom components will not work in a full jQuery-based application.
>>
>> The SUPPRESS_PROTOTYPE is useful if you have a lot of Prototype-based
>> components, so you do not have time to rewrite them. If you start a new
>> application, you should set this constant to true.
>>
>> Manu
>>
>>
>> 2012/3/30 trsvax <trs...@gmail.com>
>>
>>> I don't really know but I would imagine two things
>>>
>>> 1. Both want to use $
>>> 2. Remove the dependency on prototype.
>>>
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/Mixing-prototype-and-JQuery-based-components-tp5605199p5605479.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> Emmanuel DEMEY
>> Ingénieur Etude et Développement
>> ATOS Worldline
>> +33 (0)6 47 47 42 02
>> demey.emman...@gmail.com
>> http://emmanueldemey.fr
>>
>> Twitter : @gillespie59
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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

Reply via email to