Onur Tokan wrote:
I have a problem about creating dynamic HtmlDataTable component. The
following code renders only the column's facets. NOT the CONTENTS...
Thanks...
HtmlDataTable dataTable = new HtmlDataTable();
for (int i = 1; i <= 10 i++)
{
UIColumn column = new UIColumn();
HtmlOutputText header = new HtmlOutputText();
header.setValue("Column Header"+i);
column.setHeader(header);
for (int j = 1; j <= 100 j++)
{
HtmlOutputText rowText = new HtmlOutputText();
rowText.setValue("Row:"+j+"Column:"+i);
column.getChildren().add(rowText);
}
dataTable.getChildren().add(column);
}
return dataTable;
It looks ok to me.
One things you should do is explicitly assign an id to each component
you create. All programmatically-created components should do this. And
of course you need to invent some id-generator code to ensure that the
assigned ids are all unique. However I doubt that this is the cause of
your problem...
Regards,
Simon