Well, Tapestry shouldn't care whether a bean is implementing an interface or not. A bean is a bean, and if it has a property with the specified name, then it will be able to use it. Tapestry rarely asks for the class of a user defined object at all. NO need to include the Interface name.
If I have an object called CatImpl, which implements Cat, and Cat describes a method called getName(), then I can apply the ognl expression "name" to any object which implements Cat, no matter what the underlying implementation class actually is. That's the whole reason behind the concept of an interface - it is a contract that says that no matter what the type of the object, it is guaranteed to provide a certain set of methods. Since hibernate objects will be guaranteed to implement your designated interface, no matter what the actual implementation is, you shouldn't have any trouble. --sam On 3/13/06, Marc Ende <[EMAIL PROTECTED]> wrote: > Hi Sam, > > thanks for your Help... It looks like it is my problem. I'll try it on > the evening... > > But this solutions produces the next question: > > Can tapestry handle if I provide an interface instead of a "normal" bean > for values? > For example: > <input type="text" jwcid="@TextField" value="ognl:INterface.title"/> > > Marc > > Sam Gendler schrieb: > > There's mention of this problem in the hibernate docs. It has to do > > with the way hibernate uses proxy classes and object inheritance. The > > long and the short of it is that in order to get things working > > correctly, you need to make your domain objects implement interfaces > > and then tell hibernate that the mapping file describes the interface, > > but to instantiate classes of type InterfaceImpl. > > > > Here's the relevant page, which I only happened to stumble across > > today. I have no direct experience with this problem, so I can't give > > you a detailed description of the solution. Sorry. > > > > Section 19.1.3 is the one that interests you, I think. > > > > http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html > > > > --sam > > > > > > On 3/12/06, Marc Ende <[EMAIL PROTECTED]> wrote: > > > >> Hi Andreas, > >> > >> I've tried the targetEntity but it doesn't solve the problem. What I've > >> forgotten to mention > >> is that the class "WohnungNeu" extends the class "Objekt". > >> > >> The used OneToOne relationship works perfectly. > >> > >> I've found a startingpoint. It seems to be hibernate not tapestry... > >> > >> Thanks for your help Andreas! > >> > >> Marc > >> > >> Andreas Bulling schrieb: > >> > >>> Hi Marc, > >>> > >>> I'm using annotations so perhaps you have to take a look at the > >>> hibernate documentation to see how to define the same in the xml > >>> mapping file. > >>> > >>> Perhaps you have to define something similar to this: > >>> @ManyToMany(targetEntity = Person.class, mappedBy = "users", cascade = { > >>> CascadeType.PERSIST, CascadeType.REMOVE }) > >>> public List<Person> getPersons() > >>> { > >>> return persons; > >>> } > >>> > >>> The important part is the "targetEntity" definition. > >>> > >>> I hope this helps. > >>> > >>> > >>> > >> --------------------------------------------------------------------- > >> 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] > > > > > > > --------------------------------------------------------------------- > 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]