You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2013/11/08 18:36:19 UTC

How do you turn off prototype in 5.4

I've read it is possible to turn off prototype while using jquery, how is
this achieved? I'm running into conflicts with bootstrap hide.

Re: How do you turn off prototype in 5.4

Posted by Michael Gentry <mg...@masslight.net>.
Hi Dragan,

Perhaps I can delete some code, then.

Thanks!

mrg


On Fri, Nov 8, 2013 at 12:47 PM, Dragan Sahpaski
<dr...@gmail.com>wrote:

> You don't need to contribute to the Compatibility service just to use
> jquery instead of prototype.
>
> The explanation is in the org.apache.tapestry5.services.compatibility.Trait
> enum javadoc.
>
> /**
>  * Defines different traits that may be enabled or disabled. This was
> introduced in Tapestry 5.4 to allow certain
>  * features that exist in Tapestry 5.3 to be optionally enabled for
> compatibility.
>  */
> public enum Trait
> {
>     /**
>      * Indicates that the Scriptaculous JavaScript libraries should be
> included.  Tapestry 5.3 includes options for performing
>      * some kinds of animations when certain elements were updated or
> removed; that is no longer present in Tapestry 5.4
>      * and Scriptaculous is not used. This trait is only used if the
>      * {@linkplain
> org.apache.tapestry5.SymbolConstants#JAVASCRIPT_INFRASTRUCTURE_PROVIDER
> JavaScript infrastructure provider}
>      * is set to "prototype".
>      */
>     SCRIPTACULOUS,
>
>     /**
>      * Support for Tapestry 5.3 style initializers (the client-side {@code
> T5.initializers} namespace).</code>
>      */
>     INITIALIZERS;
> }
>
> Cheers,
> Dragan Sahpaski
>
>
> On Fri, Nov 8, 2013 at 6:42 PM, Michael Gentry <mgentry@masslight.net
> >wrote:
>
> > Hi George,
> >
> > I did it this way in AppModule.java:
> >
> >     public static void
> > contributeApplicationDefaults(MappedConfiguration<String, String>
> > configuration)
> >     {
> >         ...
> >
> > configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
> > "jquery");
> >     }
> >
> >
> >     @Contribute(Compatibility.class)
> >     public static void disableScriptaculous(MappedConfiguration<Trait,
> > Boolean> configuration)
> >     {
> >         configuration.add(Trait.SCRIPTACULOUS, false);
> >         configuration.add(Trait.INITIALIZERS, false);
> >     }
> >
> >
> > mrg
> >
> >
> >
> > On Fri, Nov 8, 2013 at 12:36 PM, George Christman
> > <gc...@cardaddy.com>wrote:
> >
> > > I've read it is possible to turn off prototype while using jquery, how
> is
> > > this achieved? I'm running into conflicts with bootstrap hide.
> > >
> >
>

Re: How do you turn off prototype in 5.4

Posted by Dragan Sahpaski <dr...@gmail.com>.
You don't need to contribute to the Compatibility service just to use
jquery instead of prototype.

The explanation is in the org.apache.tapestry5.services.compatibility.Trait
enum javadoc.

/**
 * Defines different traits that may be enabled or disabled. This was
introduced in Tapestry 5.4 to allow certain
 * features that exist in Tapestry 5.3 to be optionally enabled for
compatibility.
 */
public enum Trait
{
    /**
     * Indicates that the Scriptaculous JavaScript libraries should be
included.  Tapestry 5.3 includes options for performing
     * some kinds of animations when certain elements were updated or
removed; that is no longer present in Tapestry 5.4
     * and Scriptaculous is not used. This trait is only used if the
     * {@linkplain
org.apache.tapestry5.SymbolConstants#JAVASCRIPT_INFRASTRUCTURE_PROVIDER
JavaScript infrastructure provider}
     * is set to "prototype".
     */
    SCRIPTACULOUS,

    /**
     * Support for Tapestry 5.3 style initializers (the client-side {@code
T5.initializers} namespace).</code>
     */
    INITIALIZERS;
}

Cheers,
Dragan Sahpaski


On Fri, Nov 8, 2013 at 6:42 PM, Michael Gentry <mg...@masslight.net>wrote:

> Hi George,
>
> I did it this way in AppModule.java:
>
>     public static void
> contributeApplicationDefaults(MappedConfiguration<String, String>
> configuration)
>     {
>         ...
>
> configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
> "jquery");
>     }
>
>
>     @Contribute(Compatibility.class)
>     public static void disableScriptaculous(MappedConfiguration<Trait,
> Boolean> configuration)
>     {
>         configuration.add(Trait.SCRIPTACULOUS, false);
>         configuration.add(Trait.INITIALIZERS, false);
>     }
>
>
> mrg
>
>
>
> On Fri, Nov 8, 2013 at 12:36 PM, George Christman
> <gc...@cardaddy.com>wrote:
>
> > I've read it is possible to turn off prototype while using jquery, how is
> > this achieved? I'm running into conflicts with bootstrap hide.
> >
>

Re: How do you turn off prototype in 5.4

Posted by George Christman <gc...@cardaddy.com>.
Hi Michael, as it turns out my issue was actually a browser cache issue.
I'm using 5.4-alpha-24 and the only thing needed was configuration.add(
SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
"jquery");

I didn't seem to need disableScriptaculous as that was done in the
configuration above.

Thanks


On Fri, Nov 8, 2013 at 12:42 PM, Michael Gentry <mg...@masslight.net>wrote:

> Hi George,
>
> I did it this way in AppModule.java:
>
>     public static void
> contributeApplicationDefaults(MappedConfiguration<String, String>
> configuration)
>     {
>         ...
>
> configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
> "jquery");
>     }
>
>
>     @Contribute(Compatibility.class)
>     public static void disableScriptaculous(MappedConfiguration<Trait,
> Boolean> configuration)
>     {
>         configuration.add(Trait.SCRIPTACULOUS, false);
>         configuration.add(Trait.INITIALIZERS, false);
>     }
>
>
> mrg
>
>
>
> On Fri, Nov 8, 2013 at 12:36 PM, George Christman
> <gc...@cardaddy.com>wrote:
>
> > I've read it is possible to turn off prototype while using jquery, how is
> > this achieved? I'm running into conflicts with bootstrap hide.
> >
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York

Re: How do you turn off prototype in 5.4

Posted by Michael Gentry <mg...@masslight.net>.
Hi George,

I did it this way in AppModule.java:

    public static void
contributeApplicationDefaults(MappedConfiguration<String, String>
configuration)
    {
        ...
        configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,
"jquery");
    }


    @Contribute(Compatibility.class)
    public static void disableScriptaculous(MappedConfiguration<Trait,
Boolean> configuration)
    {
        configuration.add(Trait.SCRIPTACULOUS, false);
        configuration.add(Trait.INITIALIZERS, false);
    }


mrg



On Fri, Nov 8, 2013 at 12:36 PM, George Christman
<gc...@cardaddy.com>wrote:

> I've read it is possible to turn off prototype while using jquery, how is
> this achieved? I'm running into conflicts with bootstrap hide.
>

Re: How do you turn off prototype in 5.4

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 08 Nov 2013 15:36:19 -0200, George Christman  
<gc...@cardaddy.com> wrote:

> I've read it is possible to turn off prototype while using jquery, how is
> this achieved? I'm running into conflicts with bootstrap hide.

public static void  
contributeApplicationDefaults(MappedConfiguration<String, String>  
configuration) {
	configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER,  
"jquery");
}

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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