Iam從Tapestry 5.0.18升級到5.1.0.5我的應用程序,我得到以下JavaScript錯誤。我知道5.1.0.5中的部分ajax響應的WaitForPage()有一個修復。但我仍然不斷gettin java腳本錯誤。以下是我的代碼。升級到Tapestry5.1 Javascript錯誤
<table t:id="itemPanel" t:type="CustomSlidingPanel" closed="true" subject="literal:itemes" blockId="literal:itemPanel_content" linkToDisplay="New item" actionLink="newitem" zoneOnAction="itemZone"/>
<div id="itemPanel_content" style="display: none;">
<table t:id="itemGrid" t:type="customGrid" source="item" row="itemRow" clientId="literal:itemGrid" rowId="itemRow.itemId" add="edit" include="type, item, price,store,startDate, endDate, ynprimary" inplace="true">
<t:parameter name="editCell">
<t:actionlink t:id="editItem" t:zone="itemZone" t:context="itemRow.id">Edit</t:actionlink>
</t:parameter>
</table>
</div>
<t:zone t:id="itemZone" visible="false">
<t:delegate to="itemBlock" />
</t:zone>
<t:block t:id="itemBlock">
<div id="newitemDiv" class="dataEntry"/>
<div id="itemDivParent">
<div id="itemDiv" class="dataEntry">
<t:form t:id="itemForm" name="itemForm">
<t:if test="itemObject.id">
<script type="text/javascript">insertDivElement('itemGrid${itemObject.id}','itemDivParent','itemDiv','newitemDiv','8');</script>
</t:if>
<t:if test="newitem">
<script type="text/javascript">createNewDivElement('itemDivParent','itemDiv','newitemDiv');</script>
</t:if>
<table t:id="itemComponent" t:type="item" itemObject="itemObject"/>
<div style="width: 50%" align="center">
<input t:id="saveitem" t:type="Submit" class="button" value="Save" /> <input type="button" class="button" value="Cancel" onClick="hideDivs('itemDivParent','itemDiv','newitemDiv');" /> <t:if test="itemImported" negate="true">
<input t:id="deleteitem" t:type="SubmitContext" class="button" value="Delete" t:context="itemObject.id" /> </t:if>
</div>
<br />
</t:form>
</div>
</div>
</t:block>
這是我得到的錯誤信息。看起來像在Tapestry.js中的「Tapestry.waitForPage(event)」有問題。有人可以幫忙嗎?
Message: Object doesn't support this property or method
Line: 197
Char: 1
Code: 0
URI: http://localhost:8080/ItemEntry?itemId=131686
<a id="editItemPrice" onclick="javascript:Tapestry.waitForPage(event);" href="itementry.edititemprice/6578">Edit</a>
也許這只是一個瀏覽器緩存問題。在升級Tapestry之後,我曾經遇到過那些導致問題的舊腳本。清除緩存後,它工作。 – luukes 2012-03-27 08:05:44