components are not instantiated on  every request - they are only
instantiated when YOU instantiate them using the NEW operator...wicket
is unmanaged.

the problem with using onbeforerender is that some components need
access to resources from inside their constructors which is too early
to be handled by onbeforerender. this is why spring and guice
integrations use icomponentinstantiationlistener to inject fields.
also dont forget that what you want to inject is some sort of proxy
because components are serialized, see wicket-ioc module for such a
proxy impl.

-igor


On Nov 16, 2007 5:22 AM, Frank Martínez <[EMAIL PROTECTED]> wrote:
> Hi,
> I am working with jboss seam by about one year, now i am developing a
> wicket-seam integration based on wicket-seam-test.
> I will send it to the wicket developers when i finish it.
> I am not expert on Wicket and i have some questions:
>
> 1. Are Wicket Components instantiated on every request?
> 2. In the wicket-guice you inject external resources using
> IComponentInstantiationListener, but may i use
> IComponentOnBeforeRenderListener as well?
> 3. I plan to implement outjection using
> IComponentOnAfterRenderListener, is it right?
>
> My idea is:
> IComponentOnBeforeRenderListener.onBeforeRender
>   - Inject resources from Seam contexts
> IComponentOnAfterRenderListener.onAfterRender
>   - Outject resources to Seam context
>   - Cleanup injected references to null
>
> Please tell me if i am in the wrong way.
>
> Thanks,
>
> Frank D. Martínez M.
> Asimov Technologies Ltda.
> Blog: http://www.ibstaff.net/fmartinez/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to