Welcome to the JavaRanch, Valsaraj!
We have a special button on our message editor that adds "code" tags. Code tags can be use to wrap pre-formatted text such as
Java code or XML and make those items easier to read. I've applied a set of code tags to your sample.
When defining a View template where data is in 2-dimensional row/column format, it's much simpler to use the h:dataTable tag instead of using brute-force HTML and a looping construct (ui:repeat). Also, the dataTable pairs with a DataModel value object that will wrap your data collection with extra functions that keep you from having to code parameters on the View. Anything logic-like on a View Template is generally not a good idea.
Also, whenever you see an element ID in the form "j_1234", that means that the corresponding template element did not have an explicit ID, so the
JSF html/xml renderer synthesized one. JSF uses a concept called "naming containers" to ensure that JSF-generated HTML elements will all have unique ids (which is required to be XML-compatible).
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.