if (unassignedPanels != null && unassignedPanels.length > 0) {
Arrays.sort(unassignedPanels);
renderFragment("outputStart");
LayoutRegion[] regions = page.getLayout().getRegions();
for (int i = 0; i < unassignedPanels.length; i++) {
Panel unassignedPanel = unassignedPanels[i];
setAttribute("index", i);
setAttribute("panel", unassignedPanel);
setAttribute("panelId", unassignedPanel.getPanelId());
setAttribute("panelTitle", getLocaleManager().localize(unassignedPanel.getTitle()));
setAttribute("regions", regions);
setAttribute("providerType", unassignedPanel.getProvider().getResource(unassignedPanel.getProvider().getDescription(), getLocaleManager().getCurrentLocale()));
renderFragment("outputPanel");
}
renderFragment("outputEnd");
}
}