Hi all,

the resulting HTML of extension's DataTable (with toolbars) renders  
invalid according to the HTML specs:


> IColumn[] columns = new IColumn[2];
> columns[0] = new PropertyColumn(new Model("foo"), "foo");
> columns[1] = new PropertyColumn(new Model("bar"), "bar");
> IDataProvider provider = new EmptyDataProvider();
> DataTable table = new DataTable("table", columns, provider, 20);
> table.addTopToolbar(new HeadersToolbar(table, null));
> add(table);


> <table wicket:id="table"></table>

results in following rendered HTML:

> <table>
>       <thead>
>               <span>
>               <tr class="headers">
>                       <th><span>foo</span></th>
>                       <th><span>bar</span></th>
>               </tr>
>               </span>
>       </thead>
>       <tbody>
>       </tbody>
>       <tfoot>
>       </tfoot>
> </table>

According to (X)HTML's definition <thead> may only contain <tr> tags.  
Here we've got <span> in between, such that the HTML is not valid  
according to the specs.

I had a look into DataTable's source and found out that toolbars are  
made of RepeaterViews. From my knowledge with Wicket setting  
setRenderBodyOnly(true) on both topToolbars and bottomToolbars (which  
are of type RepeaterView) in DataTable.java should have made the  
trick. But it didn't. <span> is always rendered.

Is there anything I missed?


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to