You'd write a java class implementing DataModel, probably. You could
implement List instead if you liked. Make it into a managed bean,
and then assign your source list as a property to it.
For example
class ConsolidatedList implements List {
public ConsolidatedList()
public void setSourceList(List list) { ... }
public List getSourceList() { ... }
public int size() { return sourcelist.size() / 3 }
public get(int index) {
return new ConsolidatedObject(sourceList.get(index * 3),
sourceList.get((index * 3) + 1), sourceList.get((index * 3) + 2))
}
}
On 3/29/06, fischman_98 <[EMAIL PROTECTED]> wrote:
>
> So for option 2, how do you reference index 0's one, two and three objects?
>
> I was trying to reference the t:dataTable "var" in the t:columns? This
> wasn't working.
>
> ie:
> <t:dataTable value="#{...}" var="row" ...>
> .
> .
> <t:columns value="#{row.getColumn()
>
> I understand how to create the list of objects you described (in fact, I
> have created this already!), but I don't understand how to implement it with
> the dataTable....basically, how to loop through each row and grab the three
> objects for the columns.
>
> Really appreciate the help.
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/n-x-n-dataTable-%28myFaces%29-t1365618.html#a3662225
> Sent from the MyFaces - Users forum at Nabble.com.
>
>