1
votes

I have curious rendering problem. I'm trying to attach overlay panel with the button. When I press the button, panel is rendered. However a sub-component in the panel is not. When panel is visible and I do double click on the button, sub-component get's rendered. In the same time, when panel is not rendered and I do double click, sub-component is not rendered (and panel not displayed).

Generated html and computed CSS is the same for both painted/non-painted components. Do you know where the problem can be? Am I missing some setting? Have I overlooked something or is it a bug?

PrimeFaces template:

<p:layoutUnit position="center">
<h:form>
    <p:commandButton id="chooseLangBtn" value="Btn" type="button" />
    <p:overlayPanel id="langPanel" for="chooseLangBtn" showCloseIcon="true" dismissable="true">
        <p:selectOneListbox id="langSelect" 
                            rendered="true"
                            value="#{selectOneLanguageView.language}" 
                            converter="languageConverter" 
                            var="t" filter="true" 
                            filterMatchMode="startsWith">
            <f:selectItems value="#{languageService.languages}" 
                           var="lang" 
                           itemLabel="#{lang.name}" 
                           itemValue="#{lang}" />

            <p:column>
                <h:graphicImage width="22px" alt="#{lang.name}" library="main" name="images/flags/var/#{t.code}.svg"/>
            </p:column>

            <p:column>
                <h:outputText value="#{t.name}" />
            </p:column>
        </p:selectOneListbox>
    </p:overlayPanel>
</h:form>

Empty/Rendered images: enter image description here

1
The p:overlayPanel does not 'render' the child components, they 'render' themselves. Did you also try without the layout (in the step of creating a minimal reproducible example? And please read the documentation of the overlayPanel... there is something in there in relation to the component it is in.... - Kukeltje
Thank you Kukeltje for your answer. However it seems to me as a theme bug. When I have changed theme to other one, there was no problem with painting. I have reported the case: github.com/primefaces/themes/issues/10 - JiangHongTiao
So which theme fails and which theme is ok? And what is your PF version? - Kukeltje

1 Answers

1
votes

It's a bug in the Omega theme. See current status here: https://github.com/primefaces/themes/issues/10