2011-12-16 48 views
1

IM與JSF 2.0工作和OpenFaces <o:tabbedPane>JSF○:選項卡窗格的問題,改變的SelectedIndex

IM有一些麻煩改變標籤..我有四個JSF頁面的索引包括。

這樣

<o:tabbedPane loadingMode="client" tabGapWidth="3" id="pestana" 
        tabClass="tab_form" rolloverTabClass="tab_form2" selectedTabClass="tab_form3" 
        tabAlignment="bottomOrRight" 
        style="width:100%;" binding="#{GeneralBean.panelTabs}"> 
     <o:subPanel caption="1" styleClass="pestanas"> 
     <ui:include src="/datosDeLaCotizacion.jsf"/> 

     </o:subPanel> 
     <o:subPanel caption="2" styleClass="pestanas" disabled="true"> 
     <ui:include src="/datosDelProducto.jsf"/>  

     </o:subPanel> 
     <o:subPanel caption="3" styleClass="pestanas" disabled="true"> 
      <ui:include src="/coberturas.jsf"/> 

     </o:subPanel> 

     <o:subPanel caption="4" styleClass="pestanas" disabled="true"> 
     <ui:include src="/confirmacion.jsf"/> 

     </o:subPanel> 
    </o:tabbedPane> 

JSF頁面內..我有自己的<h:commandButton>形式這樣

<h:commandButton value="Continuar" id="botonContinuar" 
          actionListener="#{GeneralBean.continuarCotizacionPaso1}" 
          action='Forms!form.Refresh'> 
      </h:commandButton> 

當其進入的豆第一次工作正常的ActionListener的.. ,並改變<o:tabbedPane>到第二<o:subPanel>但是!當我使用<h:commandButton>的第二個<o:subPanel>不工作...沒有達到豆的actionListener ...

請幫助我,如果你知道什麼即時做錯了...謝謝!

回答

2

首先,請注意<o:tabbedPane>應該放在一個表格內(並且我想它裏面的一個表格在你的情況下)。其次,你提到你在JSF頁面中有按鈕的表單。這些頁面是否包含在您的選項卡窗格的<o:subPanel>中?

如果是這樣,那麼你實際上已經嵌套形式的頁面,這是不允許的結果。如果這是真的,那麼在這種情況下,解決方案可以從包括子網頁中刪除表單標籤一樣容易。

+0

嗨梅德..感謝喜歡你說我刪除所有的內部形式..但問題仍然存在..我有一個的效果每,第一個作品裏面......但其他人犯規達到這個bean ...只是刷新頁面...是否有多次提交的問題? – graven 2011-12-19 15:48:25