I do this conditionally by setting their rendered attribute to #, which evaluates to true for all product names except the first one. if the products is empty (no products for the company yet), I print two columns.I tried set the rowspan of the columns in the left as the size of the list or products, and then : Presumably, I need to play with rowspans in the first two columns, but I still have not found the way.Ĭould someone provide a pseudo-code for this? I still have not figured out how to do this with a subtable (in all the examples I found the subTable has the exact same columns as the master table). I have a class Company having a collection of Product objects. I need to create a rich:dataTable (or even extended) with the following features: Use CSS the smart way so that it look like rowspans. Semi-pseudo based on the basic JSF components: You can iterate over it using another UIData component such as h:dataTable (renders ), t:dataList (renders ) or a4j:repeat (renders nothing, you need to use e.g. Best what you could do is to just display the collection of products in the same row. There's unfortunately no rowspan support in JSF UIData components. This also works nicely with the Richfaces datascroller. If you aren't using this you can use that prs:collectionSize() or fn:length() as a substitute. Note that I'm using Seam which has Jboss Extended EL that allows me to call size() on the collection. You just need to take advantage of subTable and the rowKeyVar. You can do this without those complex forEachs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |