So you missed the great big warning signs about not using internal classes?

Page is an internal interface; you classes don't implement Page.
You'd be better off making nextPage type java.lang.Object.

On 7/17/07, bayk <[EMAIL PROTECTED]> 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
--
View this message in context: 
http://www.nabble.com/-T5--Passing-Pages-into-Components-tf4097307.html#a11650728
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to