You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Timo Schmidt <wi...@xomit.de> on 2014/04/24 19:33:25 UTC

Wicket extensions - Data table component tag check

Hi all,

with the release of Wicket 6.15.0 I have discovered the
following issue. The changes stated in WICKET-5534 has broken
my main application. Since I'm providing an own markup file for
my data table implementation to provide a scrollable table body
with a fixed header, the component tag check for the »table«
tag results in a MarkupException as I'm using a »div« tag as
surrounding HTML element.

As onComponentTag() should call super I'm not able to override
and thus bypass the check.

What would be a propper solution as a rewrite from »div« to
»table« in the markup file is not feasible.


  -Timo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket extensions - Data table component tag check

Posted by Timo Schmidt <wi...@xomit.de>.
On Thu 24.04.2014 21:59, Martin Grigorov wrote:
> On Thu, Apr 24, 2014 at 8:33 PM, Timo Schmidt <wi...@xomit.de> wrote:
> > 
> > with the release of Wicket 6.15.0 I have discovered the
> > following issue. The changes stated in WICKET-5534 has broken
> > my main application. Since I'm providing an own markup file for
> > my data table implementation to provide a scrollable table body
> > with a fixed header, the component tag check for the »table«
> > tag results in a MarkupException as I'm using a »div« tag as
> > surrounding HTML element.
> >
> > As onComponentTag() should call super I'm not able to override
> > and thus bypass the check.
> >
> > What would be a propper solution as a rewrite from »div« to
> > »table« in the markup file is not feasible.

> You can workaround it with something like:
> 
> @Override
> public void onComponentTag(ComponentTag tag) {
>   tag.setName("table");
>   super.onComponentTag(tag);
>   tag.setName("div");
>   ...
> }

This seems to be the only way so far, yes.


> How exactly do you use this custom datatable ? We added the
> check because some users don't know very well HTML and tried
> to use invalid HTML with the default DataTable component.

Well I'm using the DIV as a wrapping container and individual
tables for the header and the body part. By using colgroups on
both tables and some JS the columns are aligned and the height
of the body table is set. Visually this results in one table
component with a scrollable body and a fixed header.

  -Timo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket extensions - Data table component tag check

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can workaround it with something like:

@Override
public void onComponentTag(ComponentTag tag) {
  tag.setName("table");
  super.onComponentTag(tag);
  tag.setName("div");
  ...
}

How exactly do you use this custom datatable ?
We added the check because some users don't know very well HTML and tried
to use invalid HTML with the default DataTable component.

Martin Grigorov
Wicket Training and Consulting


On Thu, Apr 24, 2014 at 8:33 PM, Timo Schmidt <wi...@xomit.de> wrote:

> Hi all,
>
> with the release of Wicket 6.15.0 I have discovered the
> following issue. The changes stated in WICKET-5534 has broken
> my main application. Since I'm providing an own markup file for
> my data table implementation to provide a scrollable table body
> with a fixed header, the component tag check for the »table«
> tag results in a MarkupException as I'm using a »div« tag as
> surrounding HTML element.
>
> As onComponentTag() should call super I'm not able to override
> and thus bypass the check.
>
> What would be a propper solution as a rewrite from »div« to
> »table« in the markup file is not feasible.
>
>
>   -Timo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>