Hi! Let's say I have:
public interface Foo { getId(); } public class A implements Foo { } public class B implements Foo { } public class C implements Foo { } public class Index { private Map<Float, Foo> foos = new TreeMap<Float, Foo>(); } Let there be components for classes A,B,C, also <component.A id="" /> etc. I want in Index.tml to loop over foos, and based on Foo type to call appropriate component (A,B or C): Something like: <div t:type="loop" t:source="foos" t:value="item" > /* Here should be something like : if(item insanceof A) <component.A id="item.id" /> if(item insanceof B) <component.B id="item.id" /> if(item insanceof C) <component.C id="item.id" /> */ <t:category.preview.render t:previewId="preview.id"/> </div> As I know Tapestry If component is checking true/false on property, and adding that properties to Foo is not an option. I hope I'm clear enough. So, how could I accomplish this?