This is surprising to me. I have plenty of ajax form loop code that adds new (even transient) objects and things work as expected.
What version of Tapestry are you using? Robert On Jul 14, 2011, at 7/148:16 AM , Ray Nicholus wrote: > It turns out that my encoder is not the problem. In fact, this appears to > be an issue with Tapestry. I was not using the id from Hibernate and I > verified beforehand that my encoder was properly coded. I had a couple > other people look into this as well, and it appears that Tapestry is not > able to sync values to the server for form elements added via ajax (after > the render cycle has completed) unless the page is reloaded. > > On Wed, Jul 13, 2011 at 9:10 PM, Mark <mark-li...@xeric.net> wrote: > >> How is your encoder identifying the objects? Is it using the id from >> Hibernate (or whatever you are using)? If so, the value is id is >> going to be 0 so the encoder isn't going to be able to figure out >> which value to retrieve. This would explain why it works for objects >> that are in the db (and have an id), but not for objects outside the >> db. >> >> Also, make sure that the values are actually being persisted on the >> page. For example, if you are dealing with "people" objects and you >> add a few in Ajax, you need to make sure that these (non-persistent) >> objects are somehow stored in a list that is going to still be there >> when you want to do something with them again. >> >> Mark >> >> On Wed, Jul 13, 2011 at 11:59 AM, Ray Nicholus <rnicho...@widen.com> >> wrote: >>> Anyone? I'm returning a new unpersisted entity from my addrow listener, >>> modifying it in the UI, then clicking submit. Ajaxformloop never >> attempts >>> to update the values server-side for this new row. >>> >>> On Tue, Jul 12, 2011 at 7:27 PM, Ray Nicholus <rnicho...@widen.com> >> wrote: >>> >>>> Note that I am using a custom value encoder. When I click submit, the >>>> values in the rows that were rendered during form load are synced, >> resulting >>>> in calls to getValue of my value encoder, but this does not happen for >> rows >>>> added via the addrow event. >>> >> >> --------------------------------------------------------------------- >> 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