Yes, you are looking at it the wrong way. You're also buying into an outmoded bit of folk wisdom.
When CSS
rose to ascendency, some dogmatists began insisting that HTML tables should be verboten and everything should be done with div elements, instead. The div has its place, but the HTML table tag is still cleaner and simpler when you want to lay out a general grid.
In any event, we're talking JSF here, not raw HTML, and in JSF, the dataTable is the premier way to present grid-structured data (including cases where the "grid" is only 1 column wide, such as an ordered list). In addition to the layout, it also provides the datamodel and code infrastructure to make it easier.
Furthermore, we're talking Model/View/Controller. In MVC, each of the 3 components has a definite role. In JSF, most of the Controllers are pre-supplied for you, the backing bean is the Model, and the JSF page definition is the View template. The View template should be exactly that - a template, not a code module. Code goes in the Model (and in the Controllers, but like I said, JSF's Controllers are mostly pre-supplied).
I'm very fond of PHP as a quick-and-dirty way of getting webapps, out, but the key
word here is
dirty. It is, in fact,
precisely the case that PHP embeds the code onto the View that make PHP difficult to work with on large complex projects. JSF, on the other hand, is horribly expensive as a platform for developing simple webapps, precisely because of all the extra files you have to set up and include. As you scale up, PHP becomes less beautiful and
J2EE (and JSF) become more beautiful. They each have their places.