Author: eallen
Date: 2008-10-20 15:18:49 -0400 (Mon, 20 Oct 2008)
New Revision: 2663
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
Log:
Set a default value for binding param so it won't be written to hidden fields if the
form is redrawn because of an input error.
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-10-20 19:17:47 UTC (rev 2662)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-10-20 19:18:49 UTC (rev 2663)
@@ -261,7 +261,7 @@
self.dict_param = DictParameter(app, "exchange")
self.add_parameter(self.dict_param)
- self.phase = Parameter(app, "phase")
+ self.phase = self.PhaseParameter(app, "phase")
self.add_parameter(self.phase)
self.direct_input = DirectExchangeInput(app, "direct")
@@ -298,6 +298,10 @@
def get_default(self, session):
return dict()
+ class PhaseParameter(Parameter):
+ def get_default(self, session):
+ return ""
+
def render_title(self, session, vhost):
return self.title