Answered my own question: further up the stack is a t:form component.
This component has found itself nested in a t:form component so in this
instance then the answer would seem to be "yes".

Thing is, right, unless you *know* for a fact your component won't be
nested in a t:form somewhere down the line you must make sure that your
component nests a t:loop that everything within the loop is
serializable? Is that right?

Cheers

Russell

-----Original Message-----
From: Russell Brown [mailto:[EMAIL PROTECTED] 
Sent: 21 October 2008 11:09
To: Tapestry users
Subject: T5: class used as value in t:loop must implement serializable?

Hi,

Does the class for the "value" param of t:loop have to implement
serializable?

 

I am using t:loop over a collection of instances of our Link type  and I
get this exception:

 

UX 2008-10-21 10:39:45,509 [ERROR] u.c.v.s.u.p.Catchup Render queue
error in BeginRender[Catchup:epgwrapper.epgview.loop]: Error serializing
component action for component Catchup:epgwrapper.epgview.loop:
uk.co.vodco.sherbet.discovery.vo.Link ip=127.0.0.1

org.apache.tapestry5.ioc.internal.util.TapestryException: Error
serializing component action for component
Catchup:epgwrapper.epgview.loop: uk.co.vodco.sherbet.discovery.vo.Link

      at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(
ComponentPageElementImpl.java:922)

      at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$
300(ComponentPageElementImpl.java:50)

      at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$11.rend
er(ComponentPageElementImpl.java:351)

      

 

 

 

However if I make  uk.co.vodco.sherbet.discovery.vo.Link serializable
then the component renders.

 

So is it a requirement that a collection hold serializable class
instances to render?

 

Further to this, after making the Link class implement serializable I
attempted to pass a property of it to a component  within the t:loop
body (<t:my.own.component value="link.property"/> ) the class of the
object returned by Link.getProperty() does not implement serializable
and the same exception is thrown. So further to the above question: Must
any class whose instances are to be passed as component properties
implement serializable too? Or am I leaping to conclusions? Does the
exception indicate something else?

 

Cheers

 

Russell


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

Reply via email to