I have a concrete class A that extends BaseA and implements InterfaceA. I want to loop through a list of A using either the base class or interface as the looping variable. Trying something like this:
<t:loop source="listOfA" value="propertyOfTypeBaseA">
${propertyOfTypeBaseA.someField}
</t:loop>
gives me an error "Could not find a coercion from type A to BaseA". The same thing happens when I set value to a property of type InterfaceA. I can get the loop to work if I use Object as the looping variable type, but then I can't access any of the fields on the concrete class or the interface.
It seems like Tapestry should know how to coerce from an object to an interface it implements, but I also tried contributing a coercion from A to BaseA/InterfaceA and it still gave me that error, even though it actually showed the coercion in the list.
Any ideas?