Search code examples
cssjsfjsf-2primefaces

jsf primefaces dialog does not render completely with layout inside


i got the problem that when i want to split up my dialog with layout and layoutunits only an 10px upper part from the north layout unit becomes rendered. in that little part which is rendered you can scroll down to see the value of north "12" and center "12".

    <h:form id="mainDllg">
        <p:dialog id="mainDlg" header="12" widgetVar="mainDlg"
            rendered="true" closeOnEscape="true"
            style="width:99% !important; height:99% !important"
            resizable="false" modal="true">
            <p:outputPanel>

                <p:layout>
                    <p:layoutUnit position="north">12</p:layoutUnit>

                    <p:layoutUnit position="center">12</p:layoutUnit>
                </p:layout>
                
            </p:outputPanel>
        </p:dialog>
    </h:form>

output


Solution

  • <h:form id="mainDllg">
            <p:dialog id="mainDlg" header="12" widgetVar="mainDlg"
                rendered="true" closeOnEscape="true"
                resizable="false" modal="true">
                <p:outputPanel>
    
                    <p:layout style="min-width:400px;min-height:200px;">
                        <p:layoutUnit position="north" size="30">12</p:layoutUnit>
    
                        <p:layoutUnit position="center">12</p:layoutUnit>
                    </p:layout>
    
                </p:outputPanel>
            </p:dialog>
        </h:form>
    

    You should try this.