Thanks, Daniel.  I tried to implement what you suggested and am still running
into problems.  

First of all, when I overwrite the viewlet's __call__ method, it does not
get called.  So instead I tried creating a method and calling it from the
template for the viewlet.  I set a ipdb trace there and tried following what
they do in the z3c.form doctest to create a form and get the html from it:

ipdb> form = DepositionForm(self.context, self.request)
ipdb> form.update()
*** ComponentLookupError:
((<nrel.deposition.browser.depositionviewlet.DepositionFo
rm object at 0x73129d0>, <HTTPRequest,
URL=http://localhost:8080/Plone/silicon/base
_view>, <DepositionSystem at /Plone/silicon>), <InterfaceClass
z3c.form.interfaces.
IWidgets>, u'')
ipdb>



So right now I'm going through the z3c.form source trying to understand what
may be going on.  Any insight would be greatly appreciated.

Craig






Daniel Nouri wrote:
> 
> You'll need to wrap the form into a Products.Five.browser.BrowserView.
> Overwrite the __call__ method of that to just call the form and return
> what it returns.  This is quite similar to how
> plone.z3cform.layout.wrap_form works, and in fact, it would be easiest
> if you'd write your small wrapper template and pass that as the 'index'
> argument to wrap_form.  That template should then probably be included
> in plone.z3cform itself.
> 
> 
> -- 
> Daniel Nouri - http://danielnouri.org
> 
> 
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/product-developers
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/z3c-form-in-a-viewlet-tp1356518p1360395.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to