The ajout method is a debug method.
The main objective is that the method
HeadersToolbar//HeadersToolbar(final DataTable/RefreshingView>//Iterator>>//populateItem(Item> item)
is able to modify the content of "getheader" that is the X1 object (X1 is a for
debug).
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.
Thanks,
PHL
De : Gabriel Landon
Envoyé : mardi 22 mars 2016 18:04
À : users@wicket.apache.org
Objet : Re: Misunderstanding : Unable to find component with id 'phl' or A
child with id 'phl' already exists:
PHL,
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
repeater.
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 ; }
}
regards,
Gabriel.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Misunderstanding-Unable-to-find-component-with-id-phl-or-A-child-with-id-phl-already-exists-tp4674083p4674087.html
Sent from the Users forum mailing list archive at Nabble.com.
-
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