[Kss-devel] Marshalling of form data
Godefroid Chapelle
gotcha at bubblenet.be
Fri Feb 23 13:41:47 CET 2007
Balazs Ree wrote:
> 2007. 02. 22, 16.10 Hedley Roos wrote:
>> I am working on a project using PloneAzax and I make use of marshalling
>> (:list, :record, :records) in my page templates. Azax cannot handle
>> this, which means that in my Python scripts I do not have access to the
>> structures. There are other ugly solutions like assembling special tag
>> attributes and decoding them, but I wanted a clean solution.
>>
>> I heavily modified forms.js and kukit.js and made a single char change
>> to resourcedata.js. See attached patches and examples to understand the
>> discussion below.
>>
>> In my KSS file I had to make use of a naming convention. For exmaple
>> consider the line
>>
>> kss_MarshallTest-value_record|record: currentFormVar('arecord:record')
>
> I think we don't need the | convention in the variable name for that.
> Because that is already known from the type of the data to be sent over
> (= the output of currentFormVar). The marshaller can put the record tags
> automatically.
>
> This is actually already used with :list and maybe with :record too. So
> what we actually need to do is
>
> - to make the marshaller marshall the :records types too
>
> - to make the formvar logic smarter so that it can select the composite
> variables that belong to one varname only, from the form.
>
> I am not saying the final word on this, but changing the syntax in the
> suggested way is something we would like to avoid. So if we can do
> without it...
>
At the end of the sprint, Balazs and I discussed syntax for a few
features that we did not know how to implement.
We suddenly recalled that CSS has stuff like the following :
border: solid 1px black;
and that those space-separated values were a solution to the features we
wanted to implement.
I think it is the case this time as well.
I propose that we explore the thing shown below.
kss_MarshallTest-value_record: currentFormVar('arecord:record') record
This would be a non invasive zopism :
frameworks that do not pass type like Zope does would not state type and
they would even not know...
Your opinion ?
PS: I do not have a lot of time this week to discuss more. Please hassle
me in the coming days
--
Godefroid Chapelle (aka __gotcha)- BubbleNet http://bubblenet.be
More information about the Kss-devel
mailing list