[Zope3-Users] z3c.formjs in a viewlet

kevin gill kevin at movieextras.ie
Thu Feb 7 12:58:14 EST 2008

I am trying to put a z3c.formjs form into a viewlet.

I run into a problem with the generation of the JSSubscriptions code in
the resulting page.

By default the formjs code puts the IHaveJSSubscriptions marker interface
and the jsSubscriptions variable on the viewlet rather than the view.
There is little difficulty in copying these to the view in the update()

However, the set viewlets seem to be selected before my form viewlet
begins to operate. Thus the viewlet selection code doesn't see the
IHaveJSSubscriptions marker interfaces.

(Am I making sense so far).

My question is - how should I work around this problem?

   - I can mark the view in advance
   - I can render the subscriptions in the viewlet and thus
        have javascript in the body of the html result
   - I can give up and put the form in an IFrame

Any suggestions?



More information about the Zope3-users mailing list