I have a datatable in a jsf page. At every row there is a htmlselectone component, and I need to populate these component, based on the current row. For example if i had a table which iterates on categories, i need to populate the selectone-s with some data based on category id.
How can a do that? I don't want my Category object to hold List<SelectItem> instances, because these are JSF things.
If the list is the same for each row, no problem. If you want custom selectOne's for each different row, you will need custom SelectItem collections. That's a requirement of JSF architecture.
Don't confuse the dataTable's model with its backing data. There's no requirement that the data wrapped in the dataTable be the actual persistable data collection. I have occasionally resorted to fronting the elements in a persistable collection with decorator objects and used the collection of decorators in my dataTable.
Customer surveys are for companies who didn't pay proper attention to begin with.