BeanItemContainer with Subclasses


I am trying to use my Hibernate-Annotated classes as foundation for an beanItemContainer.

The bean I am using as input for the BeanItemContainer has a few subclasses mapped with:

	@JoinColumn(name = "statusId", nullable = true)
	private Status status;
	@JoinColumn(name = "feedbackTypeId", nullable = true)
	private FeedbackType type;
	@JoinColumn(name = "divisionId", nullable = true)
	private Division division;

Now everytime i get the results I only get the representation of toString() from the Subclasses(Status, FeedbackType, Division). How can i change the BeanItemContainer to display another field form the subclass?

I already tried to set the visible fields to something like “status.description” but that did not work.

Thanks in advance!

BeanItemContainer does not have support for nested properties yet.
Look this Add-on (PojoContainer) that is a modified version of BeanItemContainer that supports it.

Eduardo Frazão