[Erp5-report] r43331 rafael - in /erp5/trunk/products/ERP5Form: AudioField.py VideoField.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 14 21:24:57 CET 2011


Author: rafael
Date: Mon Feb 14 21:24:57 2011
New Revision: 43331

URL: http://svn.erp5.org?rev=43331&view=rev
Log:
No need to use lazyMethod (at least not for now).

Modified:
    erp5/trunk/products/ERP5Form/AudioField.py
    erp5/trunk/products/ERP5Form/VideoField.py

Modified: erp5/trunk/products/ERP5Form/AudioField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/AudioField.py?rev=43331&r1=43330&r2=43331&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/AudioField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/AudioField.py [utf8] Mon Feb 14 21:24:57 2011
@@ -2,7 +2,6 @@ from Products.Formulator.Field import ZM
 from Products.Formulator import Widget
 from Products.Formulator.DummyField import fields
 from Products.Formulator import Validator
-from Products.ERP5Form.ListBox import lazyMethod
 
 class AudioWidget(Widget.TextWidget):
   """
@@ -111,22 +110,19 @@ class AudioWidget(Widget.TextWidget):
     else:
       return []
 
-  def getContext(self):
-    """Return the context of rendering this Field..
+  def getContext(self, field, REQUEST):
+    """Return the context of rendering this Field.
     """
-    value = self.request.get('here')
+    value = REQUEST.get('here')
     if value is None:
-      value = self.getForm().aq_parent
+      value = self.getForm(field).aq_parent
     return value
 
-  getContext = lazyMethod(getContext)
 
-  def getForm(self):
+  def getForm(self, field):
     """Return the form which contains the Field.
     """
-    return self.field.aq_parent
-
-  getForm = lazyMethod(getForm)
+    return field.aq_parent
 
 AudioWidgetInstance = AudioWidget()
 

Modified: erp5/trunk/products/ERP5Form/VideoField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/VideoField.py?rev=43331&r1=43330&r2=43331&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/VideoField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/VideoField.py [utf8] Mon Feb 14 21:24:57 2011
@@ -2,7 +2,6 @@ from Products.Formulator.Field import ZM
 from Products.Formulator import Widget
 from Products.Formulator.DummyField import fields
 from Products.Formulator import Validator
-from Products.ERP5Form.ListBox import lazyMethod
 
 class VideoWidget(Widget.TextWidget):
   """
@@ -127,22 +126,20 @@ class VideoWidget(Widget.TextWidget):
     else:
       return []
 
-  def getContext(self):
-    """Return the context of rendering this Field..
+  def getContext(self, field, REQUEST):
+    """Return the context of rendering this Field.
     """
-    value = self.request.get('here')
+    value = REQUEST.get('here')
     if value is None:
-      value = self.getForm().aq_parent
+      value = self.getForm(field).aq_parent
     return value
 
-  getContext = lazyMethod(getContext)
 
-  def getForm(self):
+  def getForm(self, field):
     """Return the form which contains the Field.
     """
-    return self.field.aq_parent
+    return field.aq_parent
 
-  getForm = lazyMethod(getForm)
 
 VideoWidgetInstance = VideoWidget()
 



More information about the Erp5-report mailing list