paneName = form.getDefaultPane().getName();
}
FormatReference formatRef = FormatReferenceParser.parsePane(
paneName, pageContext);
Pane pane = pageContext.getPane(formatRef.getStem());
if (pane != null) {
// We have the associated pane to use. Now get the zeroth
// instance.
result = (AbstractPaneInstance) pageContext.getFormatInstance(
pane, formatRef.getIndex());
}
// If this field is not being rendered inline then make sure that
// the pane instance is in the current form, if it is not then
// ignore it.
if ((form != null) &&
(pane != null) &&
(pane.getEnclosingForm() != form)) {
logger.warn("pane-not-in-form",
new Object[]{paneName, form.getName()});
result = null;
}