tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Tapestry > JavaScript FAQ
Date Tue, 22 Feb 2011 00:17:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/12/_/styles/combined.css?spaceKey=TAPESTRY&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/TAPESTRY/JavaScript+FAQ">JavaScript
FAQ</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~hlship">Howard
M. Lewis Ship</a>
    </h4>
        <br/>
                         <h4>Changes (2)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >{scrollbar} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >h2. <span class="diff-changed-words">JavaScript<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;"></span></span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>Main article: [JavaScript]
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>* First, check if &#39;tapestry.js&#39;
is present in the head part of your resulting HTML page. <br></td></tr>
            <tr><td class="diff-changed-lines" >* If you have set the [tapestry.combine-scripts|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html#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. <span class="diff-added-words"style="background-color: #dfd;">{note}This
only applies to Tapestry 5.1.{note}</span> <br></td></tr>
            <tr><td class="diff-unchanged" >* If you have included jQuery in conjunction
with Tapestry&#39;s prototype, that will cause a conflict with the &#39;$&#39;
selector used by both. In this case, you should put jQuery on top of the stack and turn on
the [jQuery.noConflict|http://api.jquery.com/jQuery.noConflict/] mode. <br>* Also, if
you have included a custom or third-party JS library on top of the stack that causes the JavaScript
parsing to fail, then check the JavaScript syntax in that library. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/TAPESTRY/Link+Components+FAQ"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/TAPESTRY/Link+Components+FAQ">Link
Components FAQ</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions">Frequently Asked Questions</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/TAPESTRY/Ajax+Components+FAQ">Ajax
Components FAQ</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/TAPESTRY/Ajax+Components+FAQ"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<h2><a name="JavaScriptFAQ-JavaScript"></a>JavaScript</h2>

<p>Main article: <a href="/confluence/display/TAPESTRY/JavaScript" title="JavaScript">JavaScript</a></p>

<h3><a name="JavaScriptFAQ-WhydoIgeta%22Tapestryisundefined%22erroronformsubmit%3F"></a>Why
do I get a "Tapestry is undefined" error on form submit?</h3>

<p>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:</p>

<ul>
	<li>First, check if 'tapestry.js' is present in the head part of your resulting HTML
page.</li>
	<li>If you have set the <a href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html#COMBINE_SCRIPTS"
class="external-link" rel="nofollow">tapestry.combine-scripts</a> 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. 
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>This only applies to Tapestry
5.1.</td></tr></table></div></li>
	<li>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 <a href="http://api.jquery.com/jQuery.noConflict/" class="external-link"
rel="nofollow">jQuery.noConflict</a> mode.</li>
	<li>Also, if you have included a custom or third-party JS library on top of the stack
that causes the JavaScript parsing to fail, then check the JavaScript syntax in that library.</li>
	<li>If you have used a tool to minimize your JavaScript libraries, this can lead to
JavaScript syntax errors, so check if it works with all the JavaScript files unpacked.</li>
</ul>



<style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/TAPESTRY/Link+Components+FAQ"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/TAPESTRY/Link+Components+FAQ">Link
Components FAQ</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/TAPESTRY/Frequently+Asked+Questions">Frequently Asked Questions</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/TAPESTRY/Ajax+Components+FAQ">Ajax
Components FAQ</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/TAPESTRY/Ajax+Components+FAQ"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/TAPESTRY/JavaScript+FAQ">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=24189784&revisedVersion=10&originalVersion=9">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message