Hi all,

I've some lack of understanding about Tapestry IOC and creating new objects.

I understand the binding of service interfaces with service implementations
and the injection of these services where needed, and this is a great tool.

What I'm missing is a way to auto build or inject (or whatever the
appropriate terminology is) objects which are not services.

A concrete example is:

I have a User interface and a UserImpl implementation.  An object of type
User will be a Session State object.  How can I tell Tapestry IOC to create
a new UserImpl object when it needs to create a User object when I ask the
SessionStateManager for a User.class object?

Another example is:

I have a set of page classes which share some common functionality.  Rather
than have them use a common base class, I want to be able to give them each
an instance of a class which encompasses the common functionality.  I can't
create a new instance of this shared functionality class myself in the page
constructor, and this shared functionality can not be a Service because I
need an instance per page.  How can I get Tapestry to allow me to get an
instance (a replacement for "new")?

Thanks, and sorry if these are silly questions... I'm in the forest and
can't see the trees.

Levi

-- 
View this message in context: 
http://n2.nabble.com/-T5.1--Avoiding-%22new%22-tp3346190p3346190.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to