View Full Version : List with Data from more than one Model

26 Jul 2012, 5:50 AM
I have a dataList like the following
<div class="contact">{FirstName} {LastName}</div><div>{Company}</div>

FirstName, LastName are from one Model.Contact, Company is from Model.Client. These models have a 1 to 1 association.

I tried the following added Company as a not persistable field to Model.Contact and overriding get() in the model hoping the list would get the column dynamically at run time.

if (column=='Company'){
return this.getClient().get(column);
return this.callParent(arguments);

This doesn't work. Do people have other suggestions?