You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeroen Houtevelts <je...@mail.be> on 2004/09/15 21:38:54 UTC

my Address.jwc : ClassCastException at cleanupAfterRender()

Hello,

Trying out the 'everything is a reusable component' mantra of Tapestry, I'm  
making a component Address.jwc .

Purpose : display street, number, box, zip, city, country fields with the 
necessary validation so i can reuse it everywhere I need an address in a page.

Setup : the component takes one parameter, Address (domain object) with 
direction="form", the template lay out the fields in a HTML table, the 
controller extends BaseComponent

Problem : I get a ClassCastException at cleanupAfterRender()
java.lang.ClassCastException 
 
Stack Trace: 
org.apache.tapestry.param.AbstractParameterConnector.resetParameter
(AbstractParameterConnector.java:148) 
org.apache.tapestry.param.ParameterManager.resetParameters
(ParameterManager.java:124) 
org.apache.tapestry.AbstractComponent.cleanupAfterRender
(AbstractComponent.java:932) 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:863) 


In 'Tapestry in action' I can't find an answer.

Do you know what the problem is and how I can fix it ?

Thanks in advance!
 




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: my Address.jwc : ClassCastException at cleanupAfterRender()

Posted by Paul Ferraro <pm...@columbia.edu>.
In order to use the "form" direction for a parameter, your component 
must implement the org.apache.tapestry.form.IFormComponent interface.

Paul

Jeroen Houtevelts wrote:

>Hello,
>
>Trying out the 'everything is a reusable component' mantra of Tapestry, I'm  
>making a component Address.jwc .
>
>Purpose : display street, number, box, zip, city, country fields with the 
>necessary validation so i can reuse it everywhere I need an address in a page.
>
>Setup : the component takes one parameter, Address (domain object) with 
>direction="form", the template lay out the fields in a HTML table, the 
>controller extends BaseComponent
>
>Problem : I get a ClassCastException at cleanupAfterRender()
>java.lang.ClassCastException 
> 
>Stack Trace: 
>org.apache.tapestry.param.AbstractParameterConnector.resetParameter
>(AbstractParameterConnector.java:148) 
>org.apache.tapestry.param.ParameterManager.resetParameters
>(ParameterManager.java:124) 
>org.apache.tapestry.AbstractComponent.cleanupAfterRender
>(AbstractComponent.java:932) 
>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:863) 
>
>
>In 'Tapestry in action' I can't find an answer.
>
>Do you know what the problem is and how I can fix it ?
>
>Thanks in advance!
> 
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org