Why do I get a "Tapestry is undefined" error on form submit? (5.3 and earlier)
This client-side error is clear but can be awkward to solve. It means your browser has not been able to load the tapestry.js file properly. The question is, why? It can be due to multiple reasons, some of them below:
- First, check if 'tapestry.js' is present in the head part of your resulting HTML page.
If you have set the tapestry.combine-scripts configuration symbol to true, Tapestry generates one single URL to retrieve all the JS files. Sometimes, this can produce long URLs that browsers are unable to retrieve. Try setting the symbol to false.
- If you have included jQuery in conjunction with Tapestry's prototype, that will cause a conflict with the '$' selector used by both. In this case, you should put jQuery on top of the stack and turn on the jQuery.noConflict mode.
What's the difference between the
T5 object and the
Tapestry object in the browser? (5.3 and earlier)
Both of these objects are namespaces: containers of functions, constants, and nested namespaces.
T5 object is a replacement for the
Tapestry object, starting in release 5.3. Increasingly, functions defined by the
Tapestry object are being replaced with similar or equivalent functions in the
Tapestry object is specifically linked to Prototype and Scriptaculous.
T5 object ensures that your component will be useful regardless of whether the final application is built using Prototype, jQuery or something else.