[Zope-dev] Marshalling of records in REQUEST.form

Jean Jordaan jean@upfrontsystems.co.za
Thu, 14 Mar 2002 12:02:41 +0200


Hi all

I've just noticed this. In my form I have, for example:

 <input name='HostType:list' value='Sequential'>
 <input name='properties_to_show.ContactPerson:list' value='ContactName'>
 <input name='properties_to_show.ContactPerson:list' value='DirectEmail'>
 <input name='properties_to_show.Customer:list' value='CustomerName'>
 <input name='properties_to_show.Customer:list' value='CustomerStatus'>

When I log this after submission, I see:

 {'HostType': ['Sequential'], 'properties_to_show': ContactPerson: 
 ['ContactName', 'DirectEmail'], Customer: ['CustomerName', 
 'CustomerStatus']}

In other words, not a valid dictionary. As a valid dictionary, that 
would be:

 {'HostType': ['Sequential'], 'properties_to_show': {'ContactPerson': 
 ['ContactName', 'DirectEmail'], 'Customer': ['CustomerName', 
 'CustomerStatus']}}

Is a bug or a feature? Is the reason for the representation the fact 
that 'properties_to_show' is a record, and not a dictionary?

-- 
Jean Jordaan
Upfront Systems                         http://www.upfrontsystems.co.za