users@javaserverfaces.java.net

Re: dataTable of map

From: Thufir <hawat.thufir_at_gmail.com>
Date: Wed, 14 Apr 2010 23:56:09 +0000 (UTC)

On Tue, 13 Apr 2010 09:13:14 -0400, Raymond DeCampo wrote:

> On Mon, Apr 12, 2010 at 8:23 PM, Thufir
> <hawat.thufir_at_gmail.com> wrote:
>
>
>> I like that, because the DataTable is loaded/populated from the bean
>> rather than the view. However, I would expect that you could do
>> something like:
>>
>>
>> JTable table = new JTable(data, columnNames); //swing
>>
>> but that just doesn't work?
>>
>>
> Well, a JTable is a swing component, not a JSF component, so I am not
> sure what you are getting at.


javax.faces.model.ArrayDataModel

http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/model/
ArrayDataModel.html


looks like it might be what I was thinking of, in that, similar to swing,
you can pass an array to the constructor and the table will generate
automatically. (?)



-Thufir