You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Srikanth Madarapu <sr...@senior-systems.com> on 2005/04/06 15:29:13 UTC

extra row in a datatable

Hi

  I have a <x:datatable> with a ListDataModel. The list data model has objects of type say "X". I would like to add an additional row to the table, at the end, after all the objects in the list are rendered. I cannot add that additional row to the list because the additional row comes from a different object type "Y". Sounds weird, but is that possible ? If yes how ?

The datatable has two columns, first is a String and the second is a boolean (check box). In the last row I need to have String in the first column and a drop down list (SelectOneListBox) in the second column.

Thanks in advance.

-Srikanth Madarapu


Re: extra row in a datatable

Posted by Aaron Bartell <aa...@gmail.com>.
If this record of a different type is always the last one then it 
doesn't necessarily need to be part of the Collection, but could instead 
be a non-Collection property of your backing bean and you could use the 
footer facet of the datatable to display it.

HTH,
Aaron Bartell

Srikanth Madarapu wrote:

>Hi
>
>  I have a <x:datatable> with a ListDataModel. The list data model has objects of type say "X". I would like to add an additional row to the table, at the end, after all the objects in the list are rendered. I cannot add that additional row to the list because the additional row comes from a different object type "Y". Sounds weird, but is that possible ? If yes how ?
>
>The datatable has two columns, first is a String and the second is a boolean (check box). In the last row I need to have String in the first column and a drop down list (SelectOneListBox) in the second column.
>
>Thanks in advance.
>
>-Srikanth Madarapu
>
>
>  
>