protected LayoutController processContent(final ReportTarget target)
throws DataSourceException, ReportProcessingException, ReportDataFactoryException
{
final Node node = getElement();
final FlowController flowController = getFlowController();
final LayoutExpressionRuntime er =
LayoutControllerUtil.getExpressionRuntime(flowController, node);
final ContentElement element = (ContentElement) node;
final Expression ex = element.getValueExpression();
final Object value;
if (ex != null)
{
try
{
ex.setRuntime(er);
value = ex.computeValue();
}
finally
{
ex.setRuntime(null);
}
}
else
{
value = null;
}
// This should be a very rare case indeed ..
if (value instanceof DataFlags)
{
target.processContent((DataFlags) value);
final ContentElementLayoutController derived = (ContentElementLayoutController) clone();
derived.setProcessingState(ElementLayoutController.FINISHING);
derived.setFlowController(flowController);
return derived;
}
if (value instanceof Node)
{
// we explictly allow structural content here.
// As this might be a very expensive thing, if we
// keep it in a single state, we continue on a separate state.
final Node valueNode = (Node) value;
valueNode.updateParent(node.getParent());
final ReportContext reportContext = flowController.getReportContext();
final LayoutControllerFactory layoutControllerFactory =
reportContext.getLayoutControllerFactory();
// actually, this is the same as if the element were a
// child element of a section. The only difference is