myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glauco P. Gomes" <glaucopgo...@yahoo.com.br>
Subject Re: [TRINIDAD] table header with rowspan (and multiple lines)
Date Thu, 19 Jun 2008 22:07:59 GMT
You can use nested columns, for details search for "Column Groups" in 
the tag documentation[1] and in the developer guide[2].

[1] http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_column.html
[2] http://myfaces.apache.org/trinidad/devguide/table.html

Glauco P. Gomes

Joris Kimpe escreveu:
> Hi all,
>
> I now have a table containing another table in one of my columns.  It looks
> something like this:
>
> |      Date       |        Counters            |
> ---------------------------------------
> |  19/06/2008  |  |   AA   |   00:00   |  | 
> |                   |   |   BB   |   01:00   |  |
> ----------------------------------------
>
>
> Which I implemented like this:
> 	<tr:table id="overview" value="#{backingBean.dataModel}" var="row">
> 		<tr:column>
> 			<f:facet name="header">
> 				<tr:outputText value="Date"/>
> 			</f:facet>
> 			<tr:outputText value="#{row.date}"/>
> 		</tr:column>
> 		<tr:column>
> 			<f:facet name="header">
> 				<tr:outputText value="Counters" />
> 			</f:facet>
> 			<tr:panelFormLayout>
> 				<tr:table id="counters" value="#{row.counters}" var="counter">
> 					<tr:column>
> 						<tr:outputLabel value="#{counter.type.id}"/>
> 					</tr:column>
> 					<tr:column>
> 						<tr:outputLabel value="#{counter.value}"/>
> 					</tr:column>					
> 				</tr:table>
> 			</tr:panelFormLayout>			
> 		</tr:column>					
> 	</tr:table>
>
>
>
> Now I want to change my table to something like this:
> ---------------------------------------
> |                   |        Counters           |
> |      Date       |      AA     |      BB     |
> ---------------------------------------
> |  19/06/2008  |    00:00   |    01:00   |
> ----------------------------------------
>
>
> How can I do this?  Do I have to rewrite this by using tr:iterator,
> trh:rowLayout and trh:cellFormat?  Or can I do this easily by adapting my
> existing code?
>
> Thanks!
>
> Joris
>
>
>   


Mime
View raw message