[Kss-devel] Get currentForm to put items on request

Balazs Ree ree at ree.hu
Tue Nov 6 18:34:51 CET 2007


On Tue, 06 Nov 2007 17:59:35 +0200, Hedley Roos wrote:

> Is there a way to get currentForm to not just pass a dictionary to the
> Python  Script parameter but to actually put the values on the request.
> 
> My kss rule:
> 
> input#login-form-submit:click {
>      evt-click-preventdefault: True;
>      action-server: kss_login_form;
>      kss_login_form-form: currentForm();
> }

currentForm marshalling the way you use it is deprecated. Knowingly 
broken and won't fix. Explanation comes below...

Read the deprecation warning from the kss log in Firebug, and follow it.
If still unclear what to do, please also read point 2.7 in 
http://plone.org/documentation/howto/how-to-setup-and-use-kss-on-plone-3.0

- snip -

> A while back I wrote a Zope compatible marshaller in javascript for 
> azax. IIRC there is a point where an url is constructed in javascript. 
> Currently this is something like ?form.foo=1&form.bar=2 (this is 
> all from memory). It should be trivial to do ?foo=1&bar=2

We realized that this approach, besides it is specific to Zope, would 
require lot of code to be feature complete and would never work well. We 
decided to use another approach: to always send the whole form untouched. 
Advantage: all Zope marshalling just works without any extra support from 
javascript. (I remember having a thread on the mailing list as well, but 
not 100% sure.)

> Why do I want this? Well, ZPublisher et al kicks in before my Python 
> Script is evaluated, which means my authentication info for one is 
> incorrect since the request is not in the expected state.

Please try the supported way and report if you still have this problem.

Best wishes

-- 
Balazs Ree



More information about the Kss-devel mailing list