Re: How to extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?

2016-04-26 Thread Sven Meier

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 <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  THHeadersToolbar(final DataTable<T, S> table, final 
ISortStateLocator 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  THHeadersToolbar(final DataTable<T, S> table, final 
ISortStateLocator 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




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



RE: How to extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?

2016-04-25 Thread andre seame
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  THHeadersToolbar(final DataTable<T, S> table, final 
ISortStateLocator 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  THHeadersToolbar(final DataTable<T, S> table, final 
> ISortStateLocator 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



Re: How to extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?

2016-04-25 Thread Sven Meier

Hi,

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

public  THHeadersToolbar(final DataTable table, final 
ISortStateLocator 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  THHeadersToolbar(final DataTable table, final 
ISortStateLocator stateLocator)
  {
 super(table);

 RefreshingView> headers = new RefreshingView>("headers")
 { 


   @Override
 protected void populateItem(Item> 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 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



How to extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?

2016-04-24 Thread andre seame
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  THHeadersToolbar(final DataTable table, final 
ISortStateLocator stateLocator)
 {
super(table);

RefreshingView> headers = new RefreshingView>("headers")
{ 


  @Override
protected void populateItem(Item> 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 extends Panel implements IPageableItems
{
static abstract class CssAttributeBehavior extends Behavior


How to modify the HeadersToolbar ? Is "extends" the good idea ? Other Solution ?


Thanks,

PHL.