The ajout method is a debug method. 
The main objective is  that the method
HeadersToolbar//HeadersToolbar(final DataTable/RefreshingView<IColumn<T, 
S>>//Iterator<IModel<IColumn<T, S>>>//populateItem(Item<IColumn<T, S>> item)

is able to modify the content of "getheader" that is the X1 object (X1 is a for 

In case 1 - I use "ajout" and wicket says  phl already exists in the X1 object. 
OK, I agree. X1 has already 2 labels. 

In case 2 - I use "ajout", but the phl label is not yet declared in the java 
object (ajout must add it), but the wicket render says 
"Sorry, phl label does not exists". 

This means that I cannot modify the getheader object from HeadersToolbar. 

The example set the sortable link to the global header object. But I want to 
put the sortable link to part of the header object. 

De : Gabriel Landon <>
Envoyé : mardi 22 mars 2016 18:04
À :
Objet : Re: Misunderstanding : Unable to find component with id 'phl' or A 
child with id 'phl' already exists:


I'm sorry but it's hard to understand what your are trying to do.
Anyway, I find the X1 class very strange. I think you simply need to remove
the "ajout" method as the label is already added in the constructor. You
cannot add a label several times on the same panel unless you are using a

public class X1 extends Panel
    public X1(String id, String ColumnTilte)
        super(id) ;
        lbl = new Label("labelx", ColumnTilte) ;
        add(lbl) ;
        add(new Label("phl","added by constructor")) ;

    public Label getLabel() { return lbl ; }


View this message in context:
Sent from the Users forum mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to