-1
我們有一個tabPanel
,它有多個選項卡。在任何選項卡中執行任何事件(例如,單擊tab1中的'ajaxSubmit'按鈕)時,所有選項卡都會刷新,從而導致性能問題(例如,總是從tab3中調用'table'值的getter。任何一個選項卡(Richface 3.3.4)發生事件時刷新Tabpanel的所有選項卡
我們試圖在<a4j:region>
中打包每個選項卡的內容,但仍然調用tab3中組件的獲取者。
請看以下示例代碼段:
<r:tabPanel id="tabWorkingPanel" styleClass="otTMcontainer" selectedTab="#{tabHandlerBean.activeTab}">
<rich:tab id="tab1">
<h:commandButton value="ajaxSubmit"/>
</rich:tab>
<rich:tab id="tab2" />
<rich:tab id="tab3">
<rich:dataTable id="table" value="#{bean.someValue}">...</rich:dataTable>
</rich:tab>
</r:tabPanel>
看起來像你誤解了'h:commandButton'的運作。 'h:commandButton'在默認情況下不會執行ajax,我甚至不完全相信它可以很好地與Richfaces組件(richfaces有一些奇怪之處)配合使用。用'a4j:commandButton'替換那個命令按鈕,設置'execute =「@ this''和'render =」tab1「' – kolossus 2015-04-02 15:48:59