Hi,

Simon Kitching wrote:
> 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.

To me not, but i am not sure what you want do achieve.

creating a column,
creating a outputText as header and add it to the column.

and now create 100 outputText and add them as child to the column ?

This did not create a 100 row table!

> 
> 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
> 

Regards
  Volker
-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Reply via email to