I'm trying to create a data driven rich dataTable and it is working well; however, I cannot get the header to render as it does normally (using skins). Do I need to create a <facet name="header> element using the JSF API or what?
// build columns from meta-data in db
List<Field> fields = getError().getScreenLayout().getFields();
for (Field f : fields) {
col = new HtmlColumn();
// header
headerComponent = new HtmlOutputText();
headerComponent.setValue(f.getColumnHeading());
//headerComponent.setStyleClass("dr-table-headercell rich-table-headercell");
col.setHeader(headerComponent);
// output
HtmlOutputText outputComponent = new HtmlOutputText();
//make sure nulls get rendered as so cell border is drawn
binding = "#{auditException." + f.getAttributeMapping()
+ " == null ? \" \" : auditException."
+ f.getAttributeMapping() + "}";
// LOG.info("Creating value binding: " + binding);
outputComponent.setValueBinding("value", JSFUtil
.createValueBinding(binding));
outputComponent.setEscape(false);
col.getChildren().add(outputComponent);
table.getChildren().add(col);
}