1

我对 Dojo 工具包相当陌生,并且非常喜欢它。但是我有嵌套标签自动刷新的问题。这是我存在此问题的练习代码示例。我目前对此感到担忧,因为当子选项卡很多时,它会引入巨大的性能问题;例如:我的子选项卡是用于记录检索的首字母 AZ。

我已经尝试了各种方法来解决这个问题,但都无济于事。

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>
4

1 回答 1

1

这实际上在即将发布的 Dojo 1.4 中正常工作(您现在可以获取候选发布版本)。

几个月前我做了很多工作,重构代码以避免这样的问题。

于 2009-11-29T02:12:13.060 回答