View Javadoc

1   package org.appfuse.webapp.modules;
2   
3   import org.apache.tapestry5.SymbolConstants;
4   import org.apache.tapestry5.ioc.MappedConfiguration;
5   import org.apache.tapestry5.ioc.annotations.Contribute;
6   import org.apache.tapestry5.ioc.services.ApplicationDefaults;
7   import org.apache.tapestry5.ioc.services.SymbolProvider;
8   import org.apache.tapestry5.services.compatibility.Compatibility;
9   import org.apache.tapestry5.services.compatibility.Trait;
10  
11  public class EnableJQueryModule {
12  
13      @Contribute(SymbolProvider.class)
14      @ApplicationDefaults
15      public static void switchProviderToJQuery(MappedConfiguration<String, Object> configuration) {
16          configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
17      }
18  
19      @Contribute(Compatibility.class)
20      public static void disableScriptaculous(MappedConfiguration<Trait, Boolean> configuration) {
21          configuration.add(Trait.INITIALIZERS, false);
22      }
23  }