0

When I use p:selectOneMenu in p:dialog, selectOneMenu's panel is detached from selectOneMenu when scrolling. I found a few similar posts, but none of those solutions work:

p:selectOneMenu dropdown part scrolls and does not stay in position

p:selectOneMenu dropdown not attached to the component inside a dialog

SelectOneMenu panel scrolls with the mouse wheel

Basically all the proposed solutions use appendTo="@this", but it doesn't work in my case. I use PF 6.2.27.

Here's a part of my dialog:

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:portlet="http://java.sun.com/portlet_2_0"
xmlns:p="http://primefaces.org/ui">
<p:dialog id="dlgTest" widgetVar="dlgTestWidget" header="My dialog" closeOnEscape="true" modal="true" resizable="false"
     width="1000" height="800">


    <p:panelGrid id="pnlData" styleClass="common-panel-grid">
        <p:row>
            <p:column>
                <p:fieldset legend="HEADER" toggleable="false">
                    <h:panelGrid id="pgUseCase" >
                        <p:row>
                            ...
                        </p:row>
                        <p:row>
                            <p:column colspan="2">
                                <p:selectOneMenu id="somServices" value="#{bean.selectedService}" effect="none" disabled="#{not bean.serviceEnabled}"
                                     converter="serviceConverter" appendTo="@this">
                                    <f:selectItem itemLabel="" itemValue="#{null}" noSelectionOption="true" />
                                    <f:selectItems var="item" value="#{bean.serviceList}" itemLabel="#{item.name}" itemValue="#{item}" />
                                </p:selectOneMenu>
                            </p:column>
                        </p:row>
                    </h:panelGrid>
                </p:fieldset>
            </p:column>
        </p:row>
    </p:panelGrid>
</p:dialog>

</ui:composition>

Does anyone have some other solution to this problem?

peterremec
  • 488
  • 1
  • 15
  • 46

0 Answers0