ok, I think I begin to understand you requirement..
Quote:
- I use a grid to show some entity (=hibernate class=db table)
how do you populate your grid? JDBC (rows from database) or object approach (Hibernate query: "select p from projects as p")?
Quote:
- This grid component is not bound to "projects" or "people", so there is no way to hardcode this. It dinamically shows attributes/fields of the entity being shown. So there is no way to hardcode dependencies.
I understand that, you want a general viewer/editor of entities. that's why I think you try to use Introspection approach (this can make your job easier). take a look at
http://java.sun.com/docs/books/tutorial ... index.htmlon the other hand, if you use JDBC approach (ResultSet) you should explore Hibernate mapping to locate the column name that correspond to the cell you're editing then to find referenced entity (table?)...I think you're right to use c.getClassMappings() as posted above.
Quote:
Above you said that this could be done with <introspect>
sorry for 'introspect' (so french). It's Introspection. but see also
http://java.sun.com/developer/technical ... eflection/