How to use foreach in jsf?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Good afternoon.
There was such problem: from the database I get a string of comma separated words. In the entity (entity) links with communication one-to-many, therefore, to use the DTO pattern - does not work (or I just don't understand how).
When output to the page, I have each word display as a separate link. the roof is already going but the result is still no: - tried to convert to use a separate bin
@Stateless @ManagedBean(name = "dtFileHelper") public class FileHelper { public List myName(String name) { String[] oneName; List rez1=new ArrayList<>(); oneName = name.split(","); for (String nam:oneName) { rez1.add(nam); } return rez1; } }

And the conclusion:

But damn, it displays only the first record. Although the list rez1 - returns correct.
If you rewrite the bin to just when creating a list filled with fixed values then everything is fine - displays these values.
in what direction to dig? I understand that the debug xhtml files, no?
by | 11 views

1 Answer

0 like 0 dislike
In General, it turned out that the problem lies a little in other - the initially filled datagrid in lazy style, you had to use ui:repeat and it worked.

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
6 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked May 20, 2019 by SlandShow
110,608 questions
257,186 answers
35,573 users