fixed

calling setrenderbodyonly on the repeaters has no effect because repeaters themselves render no markup.

if you look at the markup:

<thead>
    <span wicket:id="topToolbars">
        <span wicket:id="toolbar"></span>
    </span>
</thead>

the first span was already supressed by calling item.setRenderBodyOnly(true); on the direct child of the repeater

the second span is actually owned by the toolbar component - so to supress it you have to call toolbar.setRenderBodyOnly(true);

-Igor


On 8/18/06, Jan Schlosser <[EMAIL PROTECTED]> wrote:
Hi all,

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

Java:

> 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);

Markup:

> <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?

Regards,
Jan

-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to