Thanks, 

But it no so easy, because the idea is to modify the populateItem of 
refreshingView.

Thanks,
PHL.

________________________________________
De : Sven Meier <s...@meiers.net>
Envoyé : lundi 25 avril 2016 07:22
À : users@wicket.apache.org
Objet : Re: How to extends repeater.data.table.HeadersToolbar (How to resolve 
CssAttributeBehavior) ?

Hi,

HeadersToolbar already creates a RefreshingView in its constructor, you should 
not repeat that.
The following should do:

     public <T> THHeadersToolbar(final DataTable<T, S> table, final 
ISortStateLocator<S> stateLocator)
     {
         // inherited stuff
         super(table);

         // ... do custom stuff
     }

Have fun
Sven



On 25.04.2016 00:45, andre seame wrote:
> I would like to modify
>
> org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.html
>  and 
> org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.java.
>
>
> So I would to create myHeadersToolbar that extends 
> org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.
>
>
> But, I have a problem :
>
>
> public <T> THHeadersToolbar(final DataTable<T, S> table, final 
> ISortStateLocator<S> stateLocator)
>   {
>          super(table);
>
>          RefreshingView<IColumn<T, S>> headers = new 
> RefreshingView<IColumn<T, S>>("headers")
>          { ....
>
>
>            @Override
>              protected void populateItem(Item<IColumn<T, S>> item)
>              {  ...
>                  if (column instanceof IStyledColumn)
>                  {
>
>                        CssAttributeBehavior cssAttributeBehavior = new 
> DataTable.CssAttributeBehavior() ...
>
>
> Therefore, Eclipse propose to
>
> import 
> org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable.CssAttributeBehavior;
>
>
> But this fails :
>
>
> Eclipse says : CssAttributeBehavior cannot be resolved to a type
>
>
> And Eclipse is right :
>
>
> public class DataTable<T, S> extends Panel implements IPageableItems
> {
>          static abstract class CssAttributeBehavior extends Behavior
>
>
> How to modify the HeadersToolbar ? Is "extends" the good idea ? Other 
> Solution ?
>
>
> Thanks,
>
> PHL.
>
>
>


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


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

Reply via email to