Creating content in the cells

We use the addEntry(...) method to add content to cells. This method accepts a column, a row and a Java Object which represents the content to be added to the cell.

Table 1. ListBuilder.addEntry(...) parameters
Parameter Type Descrption
col int The column index, offset 1.
row int The row index, offset 1.
content Object<?> A Java Object that represents the content. The List Renderer can accept a number of different types including CodetableItems and LocalizedString objects which it will process for display. (See Javadoc for ListBuilder)

In our movies Pod we want to add a list of movie names so we pass a Java String in the content parameter. On lines 19 to 24 we iterate over the collection of movies.

Figure 1. Add the movie names to our list
023        myFavouriteMovies.addEntry(1, row++, movieName);