You should use an attribute modifier on the totals row. like this totalsRow.add(new AttributeModifier("colspan",myModel)); If you know for a fact the number of columns is not going to change after a page refresh you could use a new SimpleAttributeModifier("colspan",length) else you should use a model to dynamically compute the number of desired columns
Maurice On 5/30/07, Thies Edeling <[EMAIL PROTECTED]> wrote: > All, > > Say that I have an HTML table with data and the last row is a total with > a colspan to align the value: > <table> > <tr> > <td wicket:id="prj">Project A</td> > <td wicket:id="col1">stuff</td> > <td wicket:id="col2">stuff</td> > <td wicket:id="col3">5</td> > </tr> > > <tr> > <td colspan="3"> </td> > <td>5</td> > </tr> > </table> > > When col2 is optional I'd do a col2.setVisible(false) on that label but > the colspan in the total row needs to be adjusted as well. Should I > create a colspan property in the Page class and do a <td colspan="<span > wicket:id="colspan" />"> or is there another preferred way? Wondering > how much I've to 'unlearn' from my JSTL way of doing things :) > > Thies > -- > http://blog.ehour.nl/ > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user