Hi Niclas, Sorry for a delayed response. The solution you suggest is not working. My Original Code is like below
<t:loop source="mYlist" value="prop:MyDataObject" > ... myDataObject.myOtherContent </t:loop> As per your suggestion i changed it to <t:loop source="mYlist" value="prop:MyDataObject" volatile=MyDataObject.myContent> ... myDataObject.myOtherContent </t:loop> also tried with values of Volatile = "true" etc It still asks for co-ercion of String to MyDataObject Would be grateful for any further pointers Thanks Sandeep Niclas.Meier wrote: > > Hi sandeep, > > The effekt that occurs is, that tapestry tries to provide a loop > context/state for the enclosing form. You need this if you have any fields > in your loop. > > If you don¹t want/need to provide a context you may mark the loop as > voliatile. This looks like: > > <t:loop source="mYlist" value="prop:MyDataObject" volatile=²true²> ... > </t:loop> > > Otherwise you'll have to provide a form state. I guess it would look like > > <t:loop source="mYlist" value="prop:MyDataObject" > volatile=²MyDataObject.someID²> ... </t:loop> > > The tapestry error message in this case is - IMHO - improvable ;-) > > Regards > Niclas > > > On 30.10.09 08:31, "sandeepraj singh" <sandeepraj.si...@atosorigin.com> > wrote: > >> >> >> Hi All, >> I have the following >> >> In MyComponent.tml >> <t:loop source="mYlist" value="prop:MyDataObject"> >> >> ${MyDataObject.someothervariable} </li> >> >> </t:loop> >> >> Ofcourse there is supporting code for the same in MyComponent.java. ie. >> having an istance variable of MyDataObject etc. >> >> In my Page, there are 2 cases >> 1) I use the component without an enclosing form. In this case the >> component >> works abs fine. >> 2) I use the component with an enclosing form. In such a case ,i recieve >> co-ercion error because of the context value that is being passed and is >> mapped to MyDataObject. The error is recieved only when the Enclosing >> FORM >> IS SUBMITTED. >> >> For scenario 2, i make a contribution to TypeCoercer to force creation of >> MyDataObject so that the problem is solved. But can any one think of a >> better way. A way in which some code in My Component takes care of the >> problem rather than a contribution inthe service. >> >> Thanks >> sandeep >> -- >> View this message in context: >> http://old.nabble.com/How-to-avoid-contribution-to-TypeCoercer-in-my-case.-tp2 >> 6126002p26126002.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://old.nabble.com/How-to-avoid-contribution-to-TypeCoercer-in-my-case.-tp26126002p26279024.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org