1
我對Dojo工具包相當陌生,並且非常喜歡它。但是我有嵌套選項卡自動刷新的問題。這裏是我的練習代碼存在問題的示例。我目前關注這一點,因爲當子標籤豐富時它會引入巨大的性能問題;例如:我的子標籤是用於記錄檢索的首字母的字母A-Z。dijit.layout.TabContainer嵌套選項卡自動加載
我已經試過各種事情來解決這個問題,並且都無濟於事。
parseOnLoad=true/false
executeScripts=true/false
preload=true/false
nested=true/false
父頁面:
<div id="mainTabContainer" name="mainTabContainer" dojoType="dijit.layout.TabContainer" persist="true" style="margin:10px; width:800px; height:700px">
<div
id="tab1"
name="tab1"
dojoType="dojox.layout.ContentPane"
title="DblClick"
selected="true"
closable="false"
parseOnLoad="true"
executeScripts="true"
preload="false"
preventCache="true"
href="/dojo1.jsp?sParentTabID=tab1">
---
</div>
<div id="tab2" name="tab2" dojoType="dojox.layout.ContentPane" title="Read File" closable="false" executeScripts="true" parseOnLoad="true" href="/dojo2.jsp?sParentTabID=tab2">---</div>
<div id="tab3" name="tab3" dojoType="dojox.layout.ContentPane" title="Form get/post" closable="false" executeScripts="true" parseOnLoad="true" href="/dojo3.jsp?sParentTabID=tab3">---</div>
<div id="tab4" name="tab4" dojoType="dojox.layout.ContentPane" title="Accordions" closable="false" executeScripts="true" parseOnLoad="true" href="/dojo4.jsp?sParentTabID=tab4">---</div>
<div id="tab5" name="tab5" dojoType="dojox.layout.ContentPane" title="Nested Tabs" closable="false" executeScripts="true" parseOnLoad="true" href="/dojo5.jsp?sParentTabID=tab5">---</div>
<div id="tab6" name="tab6" dojoType="dojox.layout.ContentPane" title="Menu" closable="false" executeScripts="true" parseOnLoad="true" href="/dojo6.jsp?sParentTabID=tab6">---</div>
<div id="tab7" name="tab7" dojoType="dojox.layout.ContentPane" title="Simple Objects" closable="false" extractContent="true" executeScripts="true" parseOnLoad="true" href="/dojo7.jsp?sParentTabID=tab7">---</div>
<div id="tab8" name="tab8" dojoType="dojox.layout.ContentPane" title="Calendar" closable="false" extractContent="true" executeScripts="true" parseOnLoad="true" href="/dojo8.jsp?sParentTabID=tab8">---</div>
</div>
子頁面(dojo5.jsp):
<div id="mainTabContainer_a4d6313" name="mainTabContainer_a4d6313" dojoType="dijit.layout.TabContainer" nested="true" style="width:95%;height:200px;">
<div id="tab1_a4d6313" name="tab1_a4d6313" dojoType="dijit.layout.ContentPane" title="First Tab" selected="true" closable="false" href="/test.jsp?tabID=tab1_a4d6313">---</div>
<div id="tab2_a4d6313" name="tab2_a4d6313" dojoType="dijit.layout.ContentPane" title="Second Tab" closable="true" href="/random.jsp?tabID=tab2_a4d6313">---</div>
<div id="tab3_a4d6313" name="tab3_a4d6313" dojoType="dijit.layout.ContentPane" title="AJAX Tab" closable="false" href="/random.jsp?tabID=tab3_a4d6313">---</div>
</div>
酷。我稍後再試。我最終創建了Dojo.form.buttons來模擬選項卡,並且每個人都擁有一個xhrGet方法來填充DIV。與我期待的結果相同,只是沒有選項卡那麼漂亮......我會嘗試1.4謝謝。 是否有變更日誌/不推薦使用的日誌? – 2009-12-02 23:29:49