Search code examples
jsfjsf-2faceletsel

JSF - Browse and print values from ArrayList<String[]> using EL


I have an ArrayList from a Bean :

...
public ArrayList<String[]> getArticleList() {
    ...
}
...

I need to print these values (with getter method) by using EL on JSF2 (such as #{bean.articlesLage}

How can I do this? Cheers


Solution

  • I don't remember if JSF supports arrays, however if you can convert your ArrayList<Array> to ArrayList<ArrayList<String>>, then something like this should work

    <ui:repeat value="#{bean.articleList}" var="t">
       <ui:repeat value="#{t}" var="s">
          #{s}
       </ui:repeat>
    </ui:repeat>