Re: DataTable and SelectAll checkbox

2019-07-17 Thread Илья Нарыжный
Hello,

Or you can check implementation of IColumn with "Select All" here:
https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/table/CheckBoxColumn.java#L49-L64

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Wed, Jul 17, 2019 at 11:36 AM Sven Meier  wrote:

> Hi,
>
> have to taken a look at:
>
>
> https://github.com/apache/wicket/blob/wicket-8.x/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckGroupPage.java
>
> That's the trick.
>
> Have fun
> Sven
>
>
> On 17.07.19 20:15, Zbynek Vavros wrote:
> > Hi,
> >
> > I know this is quite old but since I do migration to Wicket8 now I think
> if
> > there is any "nice" way to do this.
> >
> > The thing is we have this "mighty" checkbox in the header of a checkbox
> > column.
> > For now we use jQuery but for sure there has to be better way.
> >
> >  From what I have found the best way seems to use HeaderlessColumn and
> put
> > this mighty checkbox into a panel that goes into getHeader(final String
> > componentId).
> > And of course checkbox for each row into  populateItem(Item cellItem,
> > String componentId, IModel rowModel).
> >
> > The thing is, using CheckBoxGroup and CheckBoxGroupSelector these two are
> > quite separated so not even wrapping whole DataTable in CheckBoxGroup
> > doesn't really seem to do the trick.
> >
> > Anyone figured out a better way or is jquery the thing for this?
> >
> > Zbynek
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: DataTable and SelectAll checkbox

2019-07-17 Thread Sven Meier

Hi,

have to taken a look at:

https://github.com/apache/wicket/blob/wicket-8.x/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckGroupPage.java

That's the trick.

Have fun
Sven


On 17.07.19 20:15, Zbynek Vavros wrote:

Hi,

I know this is quite old but since I do migration to Wicket8 now I think if
there is any "nice" way to do this.

The thing is we have this "mighty" checkbox in the header of a checkbox
column.
For now we use jQuery but for sure there has to be better way.

 From what I have found the best way seems to use HeaderlessColumn and put
this mighty checkbox into a panel that goes into getHeader(final String
componentId).
And of course checkbox for each row into  populateItem(Item cellItem,
String componentId, IModel rowModel).

The thing is, using CheckBoxGroup and CheckBoxGroupSelector these two are
quite separated so not even wrapping whole DataTable in CheckBoxGroup
doesn't really seem to do the trick.

Anyone figured out a better way or is jquery the thing for this?

Zbynek



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



DataTable and SelectAll checkbox

2019-07-17 Thread Zbynek Vavros
Hi,

I know this is quite old but since I do migration to Wicket8 now I think if
there is any "nice" way to do this.

The thing is we have this "mighty" checkbox in the header of a checkbox
column.
For now we use jQuery but for sure there has to be better way.

>From what I have found the best way seems to use HeaderlessColumn and put
this mighty checkbox into a panel that goes into getHeader(final String
componentId).
And of course checkbox for each row into  populateItem(Item cellItem,
String componentId, IModel rowModel).

The thing is, using CheckBoxGroup and CheckBoxGroupSelector these two are
quite separated so not even wrapping whole DataTable in CheckBoxGroup
doesn't really seem to do the trick.

Anyone figured out a better way or is jquery the thing for this?

Zbynek