Author: justi9
Date: 2008-10-03 11:09:45 -0400 (Fri, 03 Oct 2008)
New Revision: 2586
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
Log:
Fix a crash from a missing form attr in ExchangeInput
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-10-03 13:27:39 UTC (rev 2585)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-10-03 15:09:45 UTC (rev 2586)
@@ -3,7 +3,7 @@
from cumin.widgets import StateSwitch
from formats import *
from wooly import Template, Writer, Attribute, Parameter, Widget
-from wooly.forms import FormInput, FormField
+from wooly.forms import FormInput, FormField, Form
from wooly.parameters import DictParameter
from wooly.resources import StringCatalog
@@ -19,6 +19,15 @@
self.name_tmpl = Template(self, "name_html")
self.key_tmpl = Template(self, "key_html")
+ self.form = None
+
+ def init(self):
+ super(ExchangeInput, self).init()
+
+ for anc in reversed(self.ancestors):
+ if isinstance(anc, Form):
+ self.form = anc
+
def get_args(self, session):
return (self.exchange,)
Show replies by date