protected final int exprElementStart(
MarinerRequestContext context,
PAPIAttributes papiAttributes)
throws PAPIException {
MarinerPageContext pageContext
= ContextInternals.getMarinerPageContext(context);
BlockAttributes attributes = (BlockAttributes) papiAttributes;
// Try and find the pane with the specified name, if it could not be
// found then return and skip the element body.
String paneName = attributes.getPane();
if (paneName != null) {
FormatReference formatRef =
FormatReferenceParser.parsePane(paneName, pageContext);
Pane pane = pageContext.getPane(formatRef.getStem());
NDimensionalIndex paneIndex = formatRef.getIndex();
if (pane == null) {
skipped = true;
return SKIP_ELEMENT_BODY;
}
paneInstance = (AbstractPaneInstance)
pageContext.getFormatInstance(pane, paneIndex);
if (paneInstance.ignore()) {
skipped = true;
return SKIP_ELEMENT_BODY;
}
pageContext.pushContainerInstance(paneInstance);
} else if (pageContext.getCurrentPane() == null) {
if (pageContext.getEnclosingRegionInstance() == null) {
// this element doesn't have a pane specified and the pane and
// region stacks are empty. This is not allowed.
throw new PAPIException(
exceptionLocalizer.format("pane-name-not-found"));
}
}
// Push this element.
pageContext.pushElement(this);
return elementStartImpl(context, attributes);
}