-
1. Re: Problem with <rich:columnGroup> output
ipraveenjain Apr 27, 2009 5:48 AM (in response to rubenrjorge)set some value for width parameter and it will be visible and if required use height as well.
-
2. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 27, 2009 7:27 AM (in response to rubenrjorge)Thank you for your reply.
I've tried setting width parameters for both the datatable and column, but it still only shows if I used the extra rich:column element. There is no height attribute on either of those components (at least I don't think there is). -
3. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 28, 2009 1:45 AM (in response to rubenrjorge)Any other ideas on this please?
-
4. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 28, 2009 10:10 PM (in response to rubenrjorge)Can anyone help me? No one ever used this component to generate table headers based on data in a backing bean?
-
5. Re: Problem with <rich:columnGroup> output
rschoeler Apr 28, 2009 10:37 PM (in response to rubenrjorge)Hi rubenrjorge, I've used constructs like your's and therefore can't help you with this specific topic.
But for some time I've read from a RF Cookbook:
http://www.jboss.org/community/docs/DOC-9607
There is also a section for dynamic creation of columns and other useful thing regarding automatic code creation. Have a look at this link - maybe it will helps you with your problem.
Regards
rschoeler -
6. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 29, 2009 2:23 AM (in response to rubenrjorge)Thank you for your reply rschoeler, unfortunately I still can't understand what is wrong here. If I use plain HTML tags it works fine with a4j:repeat, but with rich:columngroup it just doesn't output unless I add that extra blank column.
-
7. Re: Problem with <rich:columnGroup> output
nbelaevski Apr 29, 2009 10:10 AM (in response to rubenrjorge)Hello,
a4j:repeat should not be used to create rich:column/h:column elements. Try using c:forEach/rich:columns. -
8. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 29, 2009 10:31 AM (in response to rubenrjorge)Thank you for your reply nbelaevski. I can use rich:columns perfectly without any iterator, however I need to use rich:columngroup to create nested headers.
Is c:forEach compatible with rich:columngroup? -
9. Re: Problem with <rich:columnGroup> output
nbelaevski Apr 29, 2009 11:08 AM (in response to rubenrjorge)Well, have you tried putting rich:columns inside rich:columnGroup?
c:forEach and rich:columns are much alike - rich:columns is a specialized c:forEach for columns creation only. Both should work ok with rich:columnGroup. -
10. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 29, 2009 2:12 PM (in response to rubenrjorge)Thank you again for your help nbelaevski.
Firstly consider I want to do headers very similar to http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?c=columnGroup&tab=usage but taking those values from a backing bean.
I've tried your idea of using rich:columns inside rich:columnGroup, however, I can only get the first rich:columns elements to render. The second rich:columns elements and the sub-table do not render:
(Nevermind the backing bean data, I'm using the same variables for both the headers and the table body, just as an example)<rich:dataTable id="taskList2" width="400"> <f:facet name="header"> <rich:columnGroup> <rich:columns value="#{TaskListBean.headerList}" var="columns" index="ind"> <h:outputText value="#{columns.headerName}" /> </rich:columns> <rich:columns value="#{TaskListBean.headerList}" var="columns2" index="ind"> <h:outputText value="#{columns2.headerName}" /> </rich:columns> </rich:columnGroup> </f:facet> <rich:subTable value="#{TaskListBean.headerList}" var="data"> <rich:column> </rich:column> <rich:column> <h:outputText value="#{data.headerName}" /> </rich:column> </rich:subTable> </rich:dataTable>
Any other suggestions? -
11. Re: Problem with <rich:columnGroup> output
nbelaevski Apr 29, 2009 3:43 PM (in response to rubenrjorge)"rubenrjorge" wrote:
I can only get the first rich:columns elements to render. The second rich:columns elements and the sub-table do not render
Several rich:columns not rendered is a bug that's been fixed in 3.3.1, please try 3.3.1.CR1. I've tried your code - works ok with this version. -
12. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 29, 2009 10:39 PM (in response to rubenrjorge)nbelaevski, thank you once again.
I've upgraded to the new version and as you said both rich:columns elements render fine :)
I've also managed to render the columns in the way I need them to, nested, by using the following code (I used a "stub" column to break the groups in the desired position):<rich:dataTable id="taskList2" width="400"> <f:facet name="header"> <rich:columnGroup> <!-- first line of headers --> <rich:columns value="#{TaskListBean.headerList}" var="columns" index="ind" colspan="2"> <h:outputText value="#{columns.headerName}" /> </rich:columns> <!-- second line of headers --> <rich:column breakBefore="true" rendered="false"> </rich:column> <rich:columns value="#{TaskListBean.headerList}" var="columns2" index="ind"> <h:outputText value="#{columns2.headerName}" /> </rich:columns> <rich:columns value="#{TaskListBean.headerList}" var="columns2" index="ind"> <h:outputText value="#{columns2.headerName}" /> </rich:columns> </rich:columnGroup> </f:facet> <!-- table data/body --> <rich:subTable value="#{TaskListBean.headerList}" var="data"> <rich:column> <h:outputText value="#{data.headerName}" /> </rich:column> </rich:subTable> </rich:dataTable>
I still have the problem that the sub-table content is not rendered, even in the above example which you have tried. I assume that content didn't render when you tried either, did it? -
13. Re: Problem with <rich:columnGroup> output
nbelaevski Apr 30, 2009 12:33 AM (in response to rubenrjorge)I see. That is because value is not set for data table. You can use fake value:
<rich:dataTable value="#{0}">
-
14. Re: Problem with <rich:columnGroup> output
rubenrjorge Apr 30, 2009 2:00 AM (in response to rubenrjorge)It works now, I had to put the fake value both in <rich:dataTable> and <rich:subTable>. Everything renders fine now :)
Thank you very much for your time and patience nbelaevski.