_that sounds like a bug to me. It should stay as an Object, and since its not rendered, shouldn't need to string-itised.
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Loop.html value type is Object weird... so far I've only looped enums, so I wouldn't know. perhaps someone who knows about the internals ? On Fri, Apr 18, 2008 at 2:34 PM, Blower, Andy <[EMAIL PROTECTED]> wrote: > I think I encountered the same issue last week where I wanted to loop over > a List of objects that were instances of one of my own classes. The loop > component code finds it necessary to be able to convert the object into a > string and then back again when populating your value property variable from > the element of the list. > > The reason for this appears to be something to do with forms and > volatility, but I really don't understand those issues at all. (Note: it > would be *fantastic* if someone could explain the concepts behind forms and > volatility because it's not clear to me from the T5 documentation) > > Instead of creating a coercer for my class, which I had no desire to do as > this loop was not part of a form, I made my own component handle the > looping/iteration. I could have made a non-coercing generic loop component, > but as I was already creating a component whose template just needed a loop > in, I just used that component. > > I don't know what the general thought is about the loop component, but > having to coerce each element to a string for form support seems to me to be > more applicable to a special case of loop than a generic loop. But I'm very > new to Tapestry so I might be getting this all wrong. > > Does that make sense? > > Andy. > > > -----Original Message----- > > From: Jan Vissers [mailto:[EMAIL PROTECTED] > > Sent: 18 April 2008 13:28 > > To: Tapestry users > > Subject: Could not find a coercion from type java.lang.String to type > > com.****.lighting.guidecontrol.view.BreadcrumbBean > > > > Hi, > > > > Just to make sure I'm not missing something. > > > > In T4 when I wrote a @For construct I could use value="..." as long as > > I > > provided a setter|getter pair for the class involved - in this case > > BreadcrumbBean. I want to iterate over a list of beans and use each > > instance individually. Now T5 throws up on me with this nice coercion > > message. Does this mean I need to contribute my own coercion - or is > > there a more simple way? In my case BreadcrumbBean is a simple class > > holding three String members. > > > > Thanks (again :-)) > > -J. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >