Can i then do this?

Component x = new Component()
parent.add('first', x)
parent.add('second',x)

Or should it then throw an exception at runtime (it wil in develop mode)

And if there are situations that the component wants to know its name
before its added to the parent (in its constructor for example). What
then?

On 16/01/2009, Anton Veretennikov <anton.veretenni...@gmail.com> wrote:
>> Because it is imperative in many ways that the component knows it's own
>> ID.
>> Look through the code to see how many times it uses it's ID.
>
> Do you mean that instance needs to know ID BEFORE it was added?
> If not, add() can internally set ID of component sent as parameter.
> If one child can't have other ID it can be checked in setId().
>
> ---------------------------------------------------------------------
> 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