[Kss-devel] Marshalling of form data

Godefroid Chapelle gotcha at bubblenet.be
Thu Feb 22 16:08:46 CET 2007


Hedley Roos wrote:
> This applies to azax 1.1.alpha1
> 
> 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.

Against which revision of which branch are those patches ?

> 
> 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 have to name the form var with its marshalling, hence arecord:record. 
> The actual form elements will be called something like 
> arecord.foo:record of course.
> 
> And I had to use a pipe in value_record|record since a colon breaks the 
> KSS parsing. The |record denotes the marshal type.

I am sure I hate the | (don't feel personnally offensed).

I think that covering the Zope marshalling is really useful though.

OTOH, this marshalling being really specific, I'd like to avoid to 
integrate in kss core if we need to pollute the whole code base.

IOW, thanks for the code... Balazs and I will try to find the right way 
to integrate this. When ready, we might ask you to help us with trunk 
merging though.
> 
> The page templates and scripts are for use in a Plone site. I didn't 
> have time to strip Plone away and use only Zope for the test page.
> 
> My additions do not seem to break anything.
> 
> Oh, the regexp's in the Javascript are not very elegant. Sorry. And I 
> can't handle :int marshalling yet. Todo.
> 
> 

-- 
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be



More information about the Kss-devel mailing list