Hi,

then I'd suggest you just extend AbstractToolbar and do your own thing.
CssAttributeBehavior isn't magic, it's just appending a css class.

Have fun
Sven

On 26.04.2016 01:47, andre seame wrote:
Thanks,

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

Thanks,
PHL.

________________________________________
De : Sven Meier <[email protected]>
Envoyé : lundi 25 avril 2016 07:22
À : [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to