在tabview中的scrollpanel上的PrimeFaces按钮

问题描述 投票:1回答:1

我在Dialog中查看:

 <p:scrollPanel style="height: 610px; width: 740px;">
    <p:messages id="messages" showDetail="false" autoUpdate="false" closable="true" />
    <p:tabView id="tabs">
      <p:tab id="header" title="Ogólne">
        <ui:include src="Header.xhtml" />
      </p:tab>
      <p:tab id="source" title="Pomiary" >
        <ui:include src="Source.xhtml" />
      </p:tab>
    </p:tabView>
  </p:scrollPanel>

来源:

<h:panelGroup>
<p:scrollPanel style="height: 530px;">
  <p:panelGrid >
    <p:row>
      <p:column >
            <p:commandButton actionListener="#{huSourcesController.newAF()}" 
                             immediate="true" update="StudyForm-tabs-AFcoll"
                             oncomplete="PrimeFaces.focus('StudyForm-tabs-AFCollReapeat-#{huSourcesController.focusNewAF()}-AFinput');">
              <p:ajax process="StudyForm-tabs-AFcoll" partialSubmit="true" />
            </p:commandButton >
      </p:column>
    </p:row>
     ......
    <p:row>
      <p:column >
            <p:commandButton actionListener="#{huSourcesController.newGM()}" 
                             immediate="true" update="StudyForm-tabs-GMcoll"
                             oncomplete="PrimeFaces.focus('StudyForm-tabs-GMCollReapeat-#{huSourcesController.focusNewGM()}-GMinput');">
              <p:ajax process="StudyForm-tabs-GMcoll" partialSubmit="true" />
            </p:commandButton >
      </p:column>
    </p:row>
  </p:panelGrid> 
</p:scrollPanel>

当我单击顶部滚动面板上的按钮时它工作正常,但是当我向下滚动到滚动并且单击它之前我看不到的按钮时,它向上滚动并且不会触发事件/动作。当我再次滚动到此按钮并再次单击它工作正常,但如果我在滚动之前单击我没有看到的其他按钮我必须再次双击此按钮以触发事件/操作。当我通过“source.xhtml”到第一个标签时,它正常工作。它为什么这样工作?如何改变它正常工作?

我使用JSF 2.2和Primefaces 6.0。

primefaces jsf-2.2 tabview
1个回答
1
投票

解决方案:添加mode =“native”以在第二个选项卡中滚动Panel。

© www.soinside.com 2019 - 2024. All rights reserved.