Hi, See https://github.com/apache/wicket/blob/580d92ddf068040214669c085f54d2faa702a921/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.java#L57-L61 The cellItem is the <td>. You can add AttributeModifier to it to change its colspan. The other column should make the cellItem invisible (setVisible(false)) to remove its <td> from the final markup.
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Jan 22, 2016 at 7:03 PM, andre seame <[email protected]> wrote: > Hello, > > > By using the simple example of repeater, it is easy to create a HTML table > of contacts. > > > Example 1 > > ======== > > > In my case, the data are not contacts but a list of tasks. So I would like > to have : > > > <.. colspan = 2 ...>Liste of tasks of January 2016</td></tr> > => The line is "single Cell" > > <tr><td>1/01/2016 </td><td>Say happy nuew year to every body</td></tr> => > line is 2 cells > > <tr><td>2/01/2016 </td><td>begin to learn Wikclet</td></tr> > > > <.. colspan = 2 ...>Liste of tasks of February 2016</td></tr> > => The line is "single Cell" > > <tr><td>14/04/2016 </td><td>Don't forget Valentin day</td></tr> => line > is 2 cells > > > In the example, we see how to modify the tr element by adding a parmater > class: odd or even. > > > Here the question is : How to modify the tr element, but also a part of td > element that must disappear. > > > > Example 2 (a varaint of Example 1) > > ============================ > > In the contact list, there is phone number and cell number. > > If the phone number or the cell number. is empty, concatenate the cells > into a single one. > > > This mean that the HTML code must be : > > <tr> ... <td colspan=2>The unique number</td> ... </tr>. A <td></td> block > must be missing. > > > > Thanks for pointer, > > PHL. >
