[Seaside] Nested Editor Components - One More Time

Joel Turnbull joel at ardishealth.com
Mon May 25 12:26:57 UTC 2009


Sorry I seem to keep losing my message text in the email :P

---------------

I've boiled my question down to this...

What's the best way to have an editor component retain the values of it's
input fields, if those values have been changed, and nested components are
calling editors of their own?

An example scenario:

I have a customer editor component that has a name input, and a nested phone
number report component. Each report row has a phone number, type, and "Add"
link. When it is clicked the report component calls and is replaced by a
phone number editor component. This is happening within the customer editor.

The problem is that when the phone number editor component is called, the
value of the name input field in the customer editor reverts to it's
original value if it had been changed. If it had a value of "Lenny" when the
form renders, and the user changes the name to "Carl". It changes back to
"Lenny" when the user goes to add a phone number.

I get that when the anchor is clicked the form refreshes. So is ajax the
answer? Or can I take a different approach with components?

I have an .mcz of my test case that I tried to attach but I think it was
messing up my post.

Thanks
Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090525/bb89b330/attachment.htm


More information about the seaside mailing list