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