-
1. Re: Rich:subtable renders incorrectly
nbelaevski Nov 5, 2010 3:46 PM (in response to joerihendrickx)Hi Joeri,
Output looks just fine, can you please provide more information on what you are expecting to get?
-
2. Re: Rich:subtable renders incorrectly
joerihendrickx Nov 8, 2010 2:55 AM (in response to nbelaevski)Hi Nick,
I would have expected something more like this:
Belgium Brussels 26562 Georges Remi 1907 1983 Eddy Merckx France Paris 13500 Antoine de Saint-Exupery 1900 1944 Napolean Bonaparte 1769 1821 Claude Debussy 1862 1918 Germany Berlin 61632 The Netherlands Amsterdam 12 Vincent Van Gogh 1853 1890 Since the subtable comes instead of a column, this would make most sense to me.
-
3. Re: Rich:subtable renders incorrectly
ilya_shaikovsky Nov 8, 2010 3:26 AM (in response to joerihendrickx)actually subtable work just as designed. It shows details table below the master row.
Some time ago I created a workaround. It works with two level's of nesting but has problems if more. So if you have only two levels - you could try. http://community.jboss.org/message/541778#541778
-
4. Re: Rich:subtable renders incorrectly
joerihendrickx Nov 8, 2010 4:39 AM (in response to ilya_shaikovsky)Thanks Ilya,
Yeah it seems like I misunderstood what subtable is actually supposed to do. The example on the richfaces website only shows a table with a subtable and no other columns, so it's not really clear what the subtable is for.
Anyway, in case anyone bumps into this: I found a way to make it do what I want it to do, but I don't guarantee anything
<rich:dataTable value="#{test.countries}" var="country"> <rich:column rowspan="#{country.people.size() + 1}"> <h:outputText value="#{country.name}" /> </rich:column> <rich:column rowspan="#{country.people.size() + 1}"> <h:outputText value="#{country.capital}" /> </rich:column> <rich:column rowspan="#{country.people.size() + 1}"> <h:outputText value="#{country.density}" /> </rich:column> <rich:subTable value="#{country.people}" var="person"> <rich:column> <h:outputText value="#{person.name}" /> </rich:column> <rich:column> <h:outputText value="#{person.birth}" /> </rich:column> <rich:column> <h:outputText value="#{person.death}" /> </rich:column> </rich:subTable> </rich:dataTable>
I know, the +1 doesn't make any sense. Even the html output doesn't make any sense to me (the browser displays two trs next to each other) but it does render the way I want on firefox and IE.
Pretty hacky though