hmmm, i try to understand, why do you mean, that the beaneditor should create or instantiate anything for ?
if i not realy going wrong you must take care that any class, you want to edit, is instantiated before. and ofcourse you must feed the beaneditor with an instance not an interface 2008/2/3, Kheldar666 <[EMAIL PROTECTED]>: > > Heu... > > I allready have a full Hibernate/Spring instantiation system that works > perfectly well :-) . > > I'm not trying to instanciate a Bean via Tapestry. I try to edit one that is > allready loaded. > > The problem for me comes from Tapestry beanEditor that tries -I think- to > create an empty bean using the interface Address instead of AddressImpl when > it creates is BeanModel. > > Maybe be I dont know how to explain my problem clearly enought... Sorry. > > Thank you for your help :) > > Martin > > > Sven Homburg wrote: > > > > i think you missunderstood completely the sense of hibernate entities > > and IOC serices. > > > > in your case i think it makes more sense to let instantiate the enties > > by a factory class > > please read http://www.hibernate.org/328.html > > > > 2008/2/3, Kheldar666 <[EMAIL PROTECTED]>: > >> > >> Well by adding this to my module : > >> > >> public static void bind(ServiceBinder binder){ > >> binder.bind(User.class, UserImpl.class); > >> binder.bind(Address.class, AddressImpl.class); > >> } > >> > >> I solved the User instanciation problem. But It didn't solve the Address > >> instanciation problem. > >> > >> In fact User model have an Address property. I want to user BeanEditForm > >> to > >> Edit both the User and is Address. This is the component : > >> > >> <t:beanEditForm t:object="user"> > >> <t:parameter name="address"> > >> <fieldset> > >> <legend>Address</legend> > >> <t:beanEditor object="user.address" /> > >> </fieldset> > >> </t:parameter> > >> </t:beanEditForm> > >> > >> I set this in the AppModule for my address field can be detected by the > >> BeanEditor : > >> > >> public static void > >> contributeDefaultDataTypeAnalyzer(MappedConfiguration<Class<?>, String> > >> configuration) { > >> configuration.add(Address.class, "address"); > >> } > >> > >> And I stiil have the InstantiationException. If I make direct reference > >> to > >> the implementation classes that works fine (but I don't want to do it > >> that > >> way). > >> > >> I tried configuration.add(AddressImpl.class, "address"); but it does not > >> work at all because tapestru can't detect the Address field in User bean. > >> > >> Any ideas ? > >> > >> Regards, > >> > >> Martin > >> > >> > >> > >> > >> Sven Homburg wrote: > >> > > >> > 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] > >> > > >> > > >> > > >> > ----- > >> > best regards > >> > Sven > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/-T5--ASO%2C-BeanEditor-and-Interfaces-tp15254725p15255319.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] > > > > > > > > ----- > > best regards > > Sven > > > > -- > View this message in context: > http://www.nabble.com/-T5--ASO%2C-BeanEditor-and-Interfaces-tp15254725p15256687.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]