dataTable.setId("data");
dataTable.setRowClasses("class1, class2");
dataTable.setVar("person");
UIColumn column1 = new UIColumn();
HtmlOutputText text = new HtmlOutputText();
text.setValueExpression("value",
facesContext.getApplication().getExpressionFactory().createValueExpression(
facesContext.getELContext(), "#{person.firstName}", String.class));
column1.getChildren().add(text);
dataTable.getChildren().add(column1);
UIColumn column2 = new UIColumn();
HtmlOutputText text2 = new HtmlOutputText();
text2.setValueExpression("value",
facesContext.getApplication().getExpressionFactory().createValueExpression(
facesContext.getELContext(), "#{person.lastName}", String.class));
column2.getChildren().add(text2);
dataTable.getChildren().add(column2);
dataTable.setValue(new UnknownRowCountDemoDataModel<Person>(list));
String output1 = null;