I have an Entity with a OneToOne relationship with another Entity. I'd like
to render the entire Entity (and child Entity) as a row in a t:Grid.

Per the classes at the bottom of this post, by default, the t:Grid displays
fname and lname, I'd like it to display fname, lname, category.name.

I'd just like some guidance as far as best-practice approach. Should I

a) add a column to the t:Grid and manually/explicitly render the nested
value in a t:Parameter block?
b) learn more about how to render types in a BeanEditor (BeanModel,
ValueEncoder, PropertyEditor).

I ask this because I'm not sure if it is encouraged to write your own
ValueEncoder, PropertyEditor BeanModel for most non-trivial objects. If the
answer is (b), are there any examples suggestions for a link that have
proved helpful for anyone else? How, when rendering Entity1 below can I
associate the right set of classes with the rendering engine so that the
embedded Entity2 will simply render itself correctly inline?

Thanks in advance,

-Luther



public class Entity2
{
  private String name;
}

public class Entity1
{
  private String fname;
  private String lname;

   @OneToOne
  private Entity2 category;
}

Reply via email to