You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ben Tilford <be...@gmail.com> on 2010/03/08 17:36:50 UTC

Component Instantiation Listener Problem

I ran into an issue with a Component Instantiation Listener because the
listener is notified before setModelImpl is called. Is this the intended
behavior? It limits what you can do in your listener quite a bit.

Re: Component Instantiation Listener Problem

Posted by Ben Tilford <be...@gmail.com>.
Exactly what I needed.

On Mon, Mar 8, 2010 at 12:04 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> yes it is intended. you are not really meant to mock with the class
> because the listener is called before the constructors of your
> subclasses have finished.
>
> there are listeners you can use that are called in onbeforerender of
> components where you can mock with the actual component instance, not
> just the class.
>
> -igor
>
>
> On Mon, Mar 8, 2010 at 8:36 AM, Ben Tilford <be...@gmail.com> wrote:
>> I ran into an issue with a Component Instantiation Listener because the
>> listener is notified before setModelImpl is called. Is this the intended
>> behavior? It limits what you can do in your listener quite a bit.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Component Instantiation Listener Problem

Posted by Igor Vaynberg <ig...@gmail.com>.
yes it is intended. you are not really meant to mock with the class
because the listener is called before the constructors of your
subclasses have finished.

there are listeners you can use that are called in onbeforerender of
components where you can mock with the actual component instance, not
just the class.

-igor


On Mon, Mar 8, 2010 at 8:36 AM, Ben Tilford <be...@gmail.com> wrote:
> I ran into an issue with a Component Instantiation Listener because the
> listener is notified before setModelImpl is called. Is this the intended
> behavior? It limits what you can do in your listener quite a bit.
>

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