I fixed it!! Here's the deal.. I was following a thread that discussed
how to update drop down menus with ajax and the first poster there
used the right code, but the original poster then created RoughDoc
with the code that returns name instead of ID. For some reason that
causes this Rollback error in one of the components of TG.

Bad code goes:

               return OPTION((c.id,c.cityName))

Good code:

           return OPTION({value: s.id}, s.stateName);

Jorge, thanks for pointing me in the right direction. Another thing
that helped was that I took out the call to fourth field that was
updated. Before that my thinking was that it's a matter of same
transaction being used for those 2 fields, but after I took it out and
error stayed I realized that 2nd field is updated because 1st field is
generated properly by widget, but 3rd field is not updated because 2nd
field is generated by Javascript.

It's still a sort of a bug because, actually, I'm not sure if it's
legal to have html that goes <option>name</option>, ... and returns
the name. I bet it's not legal HTML. However Since browsers are OK
with that, I think TG or TurboJson or *something* should give a more
informative error message, like, "there is no id in the option field".
Would save me 3 days and 3x3 gray hairs :-).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to