"Ross J. Reedstrom" wrote:
Jim Fulton wrote:
<can't reproduce my problem>
in add_person_form:
<... rest of form/table deleted> <tr><td>PerDegree</td><td><input type=text name=PerDegree></td></tr>
Where is ':tokens'?
In the parameters list to the SQL-Method. That seems to do it for the space containing case. I didn't persue this any farther, since the natural seperator for degrees is a comma, and I got the list case working. I think it's a case of my being a python newbie as well as a zope newbie (and a sql newbie, and an HTML newbie, and ... Hey, I know Tcl, does that count? ;-)
Here's what I did for the list:
add_person_form send string to add_person_action, which contains:
<!--#call "add_per_degree(PerID=PerID, PerDegree=_.string.split(PerDegree,','), ConferringInstitution=ConferringInstitution, DegreeDate=DegreeDate)"-->
and add_per_degree is:
Aguments: PerID:int PerDegree:list ...
<!--#in PerDegree --> ...
This may seem an unnatural way to do things. I have that familiar itch that I'm not quite groking something here - It's the Zope Zen, probably. Need that flash of enlightenment. Ahh! Minor flash - the name:type syntax applies to form inputs as well, doesn't it?
Yes.
I can make my original form like:
<tr><td>PerDegree</td><td><input type=text name=PerDegree:list></td></tr>
then remove the string.split from add_person_action or some such?
Yup. The type information in the argument list is there soley to aid input form generation wizards. If you selected "Z Search Interface" from the "Add" menu, the generated input form would reflect the type information specified in the argument list. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.