Hi Klaus Take a look at http://tapestry.apache.org/tapestry5/tapestry-core/guide/coercion.html: "Type coercions occur when a value passed into a parameter (as bound in template or in an annotation) does not match the type of the parameter." The exception message indicates that the TypeCoercer Service is making use of the coercion strategies at its disposal. The doco elsewhere says you can extend the TypeCoercer service but this is outside my experience as yet so somebody else will have to help you there.
If your webshops.pages.article.ArticleList does not implement the Page interface then it cannot be cast/coerced in the way you have indicated in your implementation for Component: ArticleSearch.java. For a quick fix you might try using Object rather than Page: Component: ArticleSearch.java [code] .... @Parameter(required=true) private Object nextPage; public Object onSuccess() { ... return nextPage; } [/code] J. Klaus wrote: > Hi! > > I have a problem passing a page into a component. Its quite simple... The > component contains a form, which is responsible for the navigation (it > returns a Page by the onSuccess-Method). To allow further customization I > want to pass the page to the component by a parameter (e.g. nextPage). I can > run the page without problems, but if i successfully submit the form (-> > call the onSuccess-Method) a java.lang.IllegalArgumentException is thrown. > (Could not find a coercion from type webshops.pages.article.ArticleList to > type org.apache.tapestry.internal.structure.Page. Available coercions: > Double --> Float, Float --> Double, ...) > > A few pices of code might be helpful: > > Component: ArticleSearch.java > [code] > .... > @Parameter(required=true) > private Page nextPage; > > public Page onSuccess() { > ... > return nextPage; > } > [/code] > > Implementation of the Component: ArticleSearchImpl.java > [code] > @InjectPage > private ArticleList articleList; > > @Component(parameters={"nextPage=articleList"}) > private com.poi.egh.webshops.components.article.ArticleSearch articleSearch; > > public ArticleMaintenanceLayout getArticleMaintenanceLayout() > { > return articleMaintenanceLayout; > } > > public ArticleList getArticleList() > { > return articleList; > } > [/code] > > I have no idea why this doesnt work..... > klaus > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]