【发布时间】:2017-07-26 01:46:34
【问题描述】:
我在对话框中有视图:
<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