You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by baeschtu baeschtu <ba...@gmail.com> on 2009/10/06 15:00:56 UTC
Show an ArrayList in a
I would like to show some Strings in a <tr:table>
I tried the following with an ImageBean.java ..
public List<String> getAllImages()
{
List<String> images = new ArrayList<String>();
images.add("image01");
images.add("image02");
images.add("image03");
return images;
}
and would like to access it like this.
<tr:table var="row" value="#{ImageBean.getAllImages}">
<tr:column>
<tr:outputText value="#{row[0]}"/>
</tr:column>
</tr:table>
Is there an easy way to do this?
Re: Show an ArrayList in a
Posted by Rafa PĂ©rez <ra...@gmail.com>.
You should have
<tr:table var="row" value="#{ImageBean.allImages}">
HTH,
-- Rafa
On Tue, Oct 6, 2009 at 3:00 PM, baeschtu baeschtu <ba...@gmail.com>wrote:
> I would like to show some Strings in a <tr:table>
>
> I tried the following with an ImageBean.java ..
> public List<String> getAllImages()
> {
> List<String> images = new ArrayList<String>();
> images.add("image01");
> images.add("image02");
> images.add("image03");
> return images;
> }
>
> and would like to access it like this.
> <tr:table var="row" value="#{ImageBean.getAllImages}">
> <tr:column>
> <tr:outputText value="#{row[0]}"/>
> </tr:column>
> </tr:table>
>
>
> Is there an easy way to do this?
>