If you use an array as the value in a <h:dataTable> it will use
ArrayDataModel transparently as the DataModel implementation.
On Wed, Apr 14, 2010 at 7:56 PM, Thufir <hawat.thufir_at_gmail.com> wrote:
> 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<http://java.sun.com/javaee/javaserverfaces/2.0/docs/api/javax/faces/model/%0AArrayDataModel.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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
>