{
_LOG.warning("TRAIN_MUST_INSIDE_FORM");
return;
}
UIXProcess process = (UIXProcess) component;
UIComponent stamp = process.getNodeStamp();
if (stamp != null)
{
Train train = new Train(context, rc, process, stamp);
try
{
process.setRowKey(train.getFocusRowKey());
// Renders some fields and scripts
_renderHiddenFields(context, rc, train);
ResponseWriter writer = context.getResponseWriter();
// Need to render the frame even if there's no visible station
// to support PPR.
writer.startElement(XhtmlConstants.TABLE_ELEMENT, component);
process.setRowKey(train.getInitialRowKey());
renderId(context, component);
renderAllAttributes(context, rc, component, bean);
// Does not seem to be needed and this is not XHTML 1.0 Strict compliant
// writer.writeAttribute("align", "center", null);
if(!train.getStations().isEmpty())
{
process.setRowKey(train.getFocusRowKey());
// There're visible stations currently, let render them.
writer.startElement(XhtmlConstants.TABLE_BODY_ELEMENT, null);
_renderTrain(context, rc, process, bean, stamp, train);
writer.endElement(XhtmlConstants.TABLE_BODY_ELEMENT);
}
writer.endElement(XhtmlConstants.TABLE_ELEMENT);
}
finally
{
// Always restore the model, whatever happened
process.setRowKey(train.getInitialRowKey());
}
}
else
{
_LOG.warning("NODESTAMP_FACET_NOT_FOUND_FOR_TRAIN", component);