this should help you
http://wiki.apache.org/tapestry/Tapestry5HowToIocAndHibernate

2008/2/3, Kheldar666 <[EMAIL PROTECTED]>:
>
> Hi Everybody,
>
> I was wondering if ASO and BeanEditor can work with Interfaces ? At the
> first sight it seems not possible.
>
> Let's say I have this Interface and Classes :
>
> public interface User {
>         public int getId();
>         public void setId(int id);
>         public String getName();
>         public void setName(String name);
> }
>
> public class UserImpl implements User {
>         //An implementation with Hibernate annotation for instance
> }
>
> Everywhere in Tapestry we use Interfaces for the IoC. But if I declare
> somewhere :
>
>
> @ApplicationState
> private User _user
>
>
> I have an InstanciationException (witch is normal, because Tapestry have no
> way to guess that it should instanciate UserImpl and it tries to instanciate
> an Interface).
>
> So my question is : is there a way to tell Tapestry to instanciate the right
> class and not the Interface (may be via contributing to some Service
> configuration or something ) ? Or should I wrote a simple data object that
> can be directly instanciated and some kind of translator that would convert
> my Data Object into the class used by my internal services ?
> --
> View this message in context: 
> http://www.nabble.com/-T5--ASO%2C-BeanEditor-and-Interfaces-tp15254725p15254725.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
with regards
Sven Homburg

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

Reply via email to