Hi I am trying to replace my .page file with annotations but when I am using the @Component with a For Component I got an Exception.
this is my annotated code: @Persist public abstract Product getCurrentProduct(); public abstract void setCurrentProduct(Product product); @Component(id="products", type="For", bindings= {"source=Products", "value=currentProduct", "element=tr"}) public Iterator getProducts() { return Catalog.getGlobalCatalog().getProducts().iterator(); } and this is my working .page file snipped: <property name="currentProduct"/> <component id="products" type="For"> <binding name="source" value="ognl:products"/> <binding name="value" value="currentProduct"/> <binding name="element" value="literal:tr"/> </component> And this is the exception i get when using the annotated code: org.apache.hivemind.ApplicationRuntimeException Component Home/products is not assignable to type java.util.Iterator. location: Annotation @ org.apache.tapestry.annotations.Component(inheritInformalParameters=false, bindings=[source=Products, value=currentProduct, element=tr], id=products, type=For) of public java.util.Iterator org.comptour.tapestry.Home.getProducts() Stack Trace: - org.apache.tapestry.TapestryUtils.getComponent(TapestryUtils.java:304) - $Home_28.finishLoad($Home_28.java) - org.apache.tapestry.pageload.PageLoader.constructComponent( PageLoader.java:439) - org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613) .... what could be the Issue?? Thanx Rolf