在TabView中的滚动面板上的PrimeFaces按钮 [英] PrimeFaces button on scrollpanel which is in tabview
问题描述
我在对话框中有视图
<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"到第一个选项卡时,它可以正常工作.为什么这样工作?如何将其更改为正常工作?
When I click a button on top scrollpanel it work fine, but when I scroll down to button which I not see before scroll and click it, It scrolling to up and don't fire event/action. When I again scroll to this button and click again it work fine, but if I click other button which I don't see on before scroll I must again double time click this button to fire event/action. When I past "source.xhtml" to first tab it work normal. Why it work like this? how change it to work normal?
我使用JSF 2.2和Primefaces 6.0.
I use JSF 2.2 and Primefaces 6.0.
推荐答案
解决方案:在secand标签中将mode ="native"添加到scrollPanell.
Solution: add mode="native" to scrollPanell in secand tab.
这篇关于在TabView中的滚动面板上的PrimeFaces按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!