I am getting started with JSF and I tried to do the following:
I have a Service that contains of a list of films:
@Named
@RequestScoped
public class FilmListView {
@Inject
FilmService filmService;
private List<Film> filmList = new ArrayList<Film>();
public FilmListView() { }
/**
* Loads all films upon starting - empty list if database is empty
*/
public void onload(){
this.filmList = filmService.readAll();
addMockupData();
}
private void addMockupData() {
Film film = new Film();
film.setTitle("MockupTitle");
film.setDescription("MockupDescr.");
film.setReleaseyear((short) 1997);
this.filmList.add(film);
}
}
And a view that is supposed to print these items in a list:
<h:dataTable value="#{filmListView.filmList}" var="film">
<h:column>
<f:facet name="header">Filmname</f:facet>
#{film.title}
</h:column>
<h:column>
<f:facet name="header">Schauspieler</f:facet>
#{film.description}
</h:column>
<h:column>
<f:facet name="header">Jahr</f:facet>
#{film.releaseyear}
</h:column>
</h:dataTable>
just according to this documentation.
Sadly this results in:
So there seems to be an issue with the translation. I am not getting any error or something else. What did I do wrong?