This content has been marked as final.
Show 1 reply
-
1. Re: How to create datatable through code in bean??
daedlus Nov 20, 2007 9:49 AM (in response to tkalactomo)i found this on searching ..
public UIData getDataTable() { UIColumn col; UIOutput out = null; Application app = FacesContext.getCurrentInstance().getApplication(); int colCount = 3; for(int j = 0; j < colCount; ++j) { out = new UIOutput(); col = new UIColumn(); ValueBinding vb = app.createValueBinding("#{" + j + "}"); //create el expression out.setValueBinding("value", vb); out.setRendererType("javax.faces.Text"); col.getChildren().add(out); dataTable.getChildren().add(col); } return dataTable; }