You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Frank Martínez <mn...@gmail.com> on 2007/11/16 14:22:36 UTC

Seam Integration and Injection

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Seam Integration and Injection

Posted by Igor Vaynberg <ig...@gmail.com>.
its possible, you just have to figure out how to do it :)

-igor


On Nov 18, 2007 5:23 AM, Frank Martínez <mn...@gmail.com> wrote:
> Hi Igor and Eelco,
> I studied wicket-seam code and i understand its injection pattern
> pretty well. But i want to implement the seam integration by other
> approach because there are some special things:
>
> 1. With SeamProxyTargetLocator is not possible to inject null values.
> 2. in IComponentInstantiationListener.onAfterRender all component
> attributes are null (I dont know why).
>
> I want to do all injections every request and outject and cleanup any
> previous injected resource after every request. Is it possible?
>
> Thanks,
> Frank.
>
>
>
> On Nov 16, 2007 12:53 PM, Eelco Hillenius <ee...@gmail.com> wrote:
> > On Nov 16, 2007 5:22 AM, Frank Martínez <mn...@gmail.com> 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.
> >
> > Good to hear someone is working on it!
> >
> > > I will send it to the wicket developers when i finish it.
> >
> > You can work directly on it if you like. If you give us a source forge
> > id, we can give you write access and the project is yours :-)
> >
> >
> > Eelco
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
>
> --
> Frank D. Martínez M.
> Asimov Technologies Ltda.
> Blog: http://www.ibstaff.net/fmartinez/
>
> ---------------------------------------------------------------------
>
> 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: Seam Integration and Injection

Posted by Eelco Hillenius <ee...@gmail.com>.
> Hi Igor and Eelco,
> I studied wicket-seam code and i understand its injection pattern
> pretty well. But i want to implement the seam integration by other
> approach because there are some special things:
>
> 1. With SeamProxyTargetLocator is not possible to inject null values.
> 2. in IComponentInstantiationListener.onAfterRender all component
> attributes are null (I dont know why).

You mean IComponentOnAfterRenderListener? I wouldn't know why tbh...

Anyway, you could look at using IComponentOnBeforeRenderListener for
injecting and using IComponentOnAfterRenderListener for cleaning up
(outjecting?). You should ignore IComponentInstantiationListener here
because component instances can be reused over multiple requests.

Eelco

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


Re: Seam Integration and Injection

Posted by Frank Martínez <mn...@gmail.com>.
Hi Igor and Eelco,
I studied wicket-seam code and i understand its injection pattern
pretty well. But i want to implement the seam integration by other
approach because there are some special things:

1. With SeamProxyTargetLocator is not possible to inject null values.
2. in IComponentInstantiationListener.onAfterRender all component
attributes are null (I dont know why).

I want to do all injections every request and outject and cleanup any
previous injected resource after every request. Is it possible?

Thanks,
Frank.


On Nov 16, 2007 12:53 PM, Eelco Hillenius <ee...@gmail.com> wrote:
> On Nov 16, 2007 5:22 AM, Frank Martínez <mn...@gmail.com> 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.
>
> Good to hear someone is working on it!
>
> > I will send it to the wicket developers when i finish it.
>
> You can work directly on it if you like. If you give us a source forge
> id, we can give you write access and the project is yours :-)
>
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Frank D. Martínez M.
Asimov Technologies Ltda.
Blog: http://www.ibstaff.net/fmartinez/

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


Re: Seam Integration and Injection

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 16, 2007 5:22 AM, Frank Martínez <mn...@gmail.com> 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.

Good to hear someone is working on it!

> I will send it to the wicket developers when i finish it.

You can work directly on it if you like. If you give us a source forge
id, we can give you write access and the project is yours :-)

Eelco

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


Re: Seam Integration and Injection

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 16, 2007 8:15 AM, Igor Vaynberg <ig...@gmail.com> wrote:
> 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.

wicket-seam-test does this, see SeamProxyTargetLocator.

Eelco

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


Re: Seam Integration and Injection

Posted by Igor Vaynberg <ig...@gmail.com>.
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 <mn...@gmail.com> 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: 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