JSF o:tabbedPane问题更改SelectedIndex [英] JSF o:tabbedPane issue changing SelectedIndex

查看:125
本文介绍了JSF o:tabbedPane问题更改SelectedIndex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

im与JSF 2.0和OpenFaces <o:tabbedPane>

im working with JSF 2.0 and the OpenFaces <o:tabbedPane>

我在更改选项卡时遇到了一些麻烦..我有一个包含四个jsf页面的索引.

im having some troubles changing the tabs.. i have an index with four jsf pages includes.

像这样

<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>是这样的

inside the jsf pages.. i have forms with their <h:commandButton> like this

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

当它第一次进入Bean上的actionListener时工作正常……并将<o:tabbedPane>更改为第二个<o:subPanel>,但是!当我使用第二个<o:subPanel><h:commandButton>时不起作用...没有到达Bean上的actionListener ...

when its goes to the actionListener on the Bean the first time works fine... and changes the <o:tabbedPane> to the second <o:subPanel> but! when i use the <h:commandButton> of the second <o:subPanel> does not work... is not reaching the actionListener on the Bean...

如果您知道自己做错了什么,请帮助我...谢谢!

Please help me if you know what im doing wrong... Thanks!

推荐答案

首先,请注意<o:tabbedPane>应该放在表单的内部(我想它在您的表单内部案子).其次,您要提到的是JSF页面中具有带有按钮的表单.这些页面是否包含在选项卡式窗格的<o:subPanel>中?

First, note that <o:tabbedPane> should be placed inside of a form (and I suppose that it is inside a form in your case). Second, you're mentioning that you have forms with buttons inside of JSF pages. Are these the pages that are included into <o:subPanel> of your tabbed pane?

如果是这样,那么您的页面上实际上就有嵌套的表单,这是不允许的.如果是这样,那么在这种情况下,解决方案就像从包含的子页面中删除表单标签一样简单.

If so, then you actually have nested forms as a result on your page, which is not allowed. If this is true, then the solution in this case can be as easy as removing the form tags from the included sub-pages.

这篇关于JSF o:tabbedPane问题更改SelectedIndex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆