Miguel Sánchez Beato a écrit :
>  
> Hello. I'm dealing with a Method Widget and I want to use a custom page
> tamplate to render the content of this widget. The point is that I need
> the proxy that contains the widget, but I can't  "see" it from the widget.
> 
> I've tried context.getDataModel(context) but the 'proxy' here is None
> (the 'context' vble is the widget)
> 
> Any ideas for taking the proxy from a widget?
> CPS version: 3.4.4
> 

Look at the CPSFileWidget class in
http://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSSchemas/trunk/BasicWidgets.py

dm = datastructure.getDataModel()

One of the following methods shoud return you the object you want :

ob = dm.getProxy()
ob = dm.getObject()
ob = dm.getContext()


Cheers,

-- 
Marc-Aurèle DARCHE
Open Source Enterprise Content Management (ECM)   http://www.nuxeo.org/
NUXEO (Paris, France)                             http://nuxeo.com/

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to