Tapestry API - 5.4-beta-22
org.apache.tapestry5.services.javascript

Class AMDWrapper

    • Method Detail

      • require

        public AMDWrapper require(String moduleName,
                         String parameterName)
        Add a dependency on another module. The module will be passed into the generated factory function as a parameter.
        Parameters:
        moduleName - the name of the required module, e.g. jQuery
        parameterName - the module's corresponding parameter name of the factory function, e.g. $
        Returns:
        this AMDWrapper for further configuration
      • require

        public AMDWrapper require(String moduleName)
        Add a dependency on another module. The module will be loaded but not passed to the factory function. This is useful for dependencies on other modules that do not actually return a value.
        Parameters:
        moduleName - the name of the required module, e.g. bootstrap/transition
        Returns:
        this AMDWrapper for further configuration
      • setReturnExpression

        public AMDWrapper setReturnExpression(String returnExpression)
        Optionally sets a return expression for this module. If the underlying library creates a global variable, this is usually what is returned here.
        Parameters:
        returnExpression - the expression that is returned from this module (e.g. Raphael)
        Returns:
        this AMDWrapper for further configuration
Tapestry API - 5.4-beta-22

${project.version} - Copyright © 2003-2014 The Apache Software Foundation.