UI Layout Initialization Error-The center-pane element does not exist

后端 未结 4 1603
无人共我
无人共我 2021-01-18 09:01

I am using a Layout structure that has centerLayout, westLayout,northLayout

When i run the file, i take this following error: \"/UI Layout Initialization Error. Th

相关标签:
4条回答
  • 2021-01-18 09:12

    This happens when there is an error in the part of the page that is inside the center pane part. This can be an invalid xhtml tag, something wrong in a bean being called or whatever. Look in your server logging an see if there is anything there.

    0 讨论(0)
  • 2021-01-18 09:18

    This seems to be a bug in Primefaces 6.2 and has been answered here: UI Layout Initialization Error PrimeFaces 6.2

    0 讨论(0)
  • 2021-01-18 09:23

    On primefaces 5.1 I had the case when options ware set by controler bean

    <pe:layout id="fullPage" options="#{layoutController.layoutOptions}" stateCookie="true">
    

    and in that controler I was setting child layoutPanes that ware not defined

    // options for nested center layout
    LayoutOptions childCenterOptions = new LayoutOptions();
    center.setChildOptions(childCenterOptions);
    
    // options for center-north pane
    LayoutOptions centerNorth = new LayoutOptions();
    centerNorth.addOption("size", "50%");
    childCenterOptions.setNorthOptions(centerNorth);
    

    So if you are extending primefaces showcase, be sure to disable configuration on the unexsisting panes.

    Since this error is not shown on other missing panes (east, west,..) this could be a big headache to solve.

    0 讨论(0)
  • 2021-01-18 09:24

    As the error message suggests you are missing the center part of the layout.

    It is a required element.

    Define one similar to this:

    <p:layoutUnit position="center">
     YOUR CONTENT 
    </p:layoutUnit>
    
    0 讨论(0)
提交回复
热议问题