Monday 28 October 2013

ADF - Region Error Multiple Root Components

The region component with id: x has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.

This error does not have anything to do with your Page holding your Region, it has to do with your Region (r1 - tfdAssignGraph).

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:f="http://java.sun.com/jsf/core">
  <af:decorativeBox id="db1">
    <f:facet name="center"/>
    <f:facet name="top"/>
  </af:decorativeBox>
  <af:decorativeBox id="db2">
    <f:facet name="center"/>
    <f:facet name="top"/>
  </af:decorativeBox>
</jsp:root>


You can solve the issue by having some other component as the "Root" component, like this:
Resolved is replacing what you have with one "Root" Component.

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:f="http://java.sun.com/jsf/core">
  <af:panelGroupLayout id="pgl1">
    <af:decorativeBox id="db1">
      <f:facet name="center"/>
      <f:facet name="top"/>
    </af:decorativeBox>
    <af:decorativeBox id="db2">
      <f:facet name="center"/>
      <f:facet name="top"/>
    </af:decorativeBox>
  </af:panelGroupLayout>
</jsp:root>

I hope this helps.

#bearMan

No comments:

Post a Comment