use of org.apache.ofbiz.widget.model.ModelScreenWidget.Column in project ofbiz-framework by apache.
the class MacroScreenRenderer method renderColumnContainer.
@Override
public void renderColumnContainer(Appendable writer, Map<String, Object> context, ColumnContainer columnContainer) throws IOException {
String id = columnContainer.getId(context);
String style = columnContainer.getStyle(context);
StringBuilder sb = new StringBuilder("<@renderColumnContainerBegin");
sb.append(" id=\"");
sb.append(id);
sb.append("\" style=\"");
sb.append(style);
sb.append("\" />");
executeMacro(writer, sb.toString());
for (Column column : columnContainer.getColumns()) {
id = column.getId(context);
style = column.getStyle(context);
sb = new StringBuilder("<@renderColumnBegin");
sb.append(" id=\"");
sb.append(id);
sb.append("\" style=\"");
sb.append(style);
sb.append("\" />");
executeMacro(writer, sb.toString());
for (ModelScreenWidget subWidget : column.getSubWidgets()) {
try {
subWidget.renderWidgetString(writer, context, this);
} catch (GeneralException e) {
throw new IOException(e);
}
}
executeMacro(writer, "<@renderColumnEnd />");
}
executeMacro(writer, "<@renderColumnContainerEnd />");
}
Aggregations