[rhmessaging-commits] rhmessaging commits: r1093 - mgmt/cumin/python/wooly.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Tue Oct 16 13:50:35 EDT 2007
Author: justi9
Date: 2007-10-16 13:50:35 -0400 (Tue, 16 Oct 2007)
New Revision: 1093
Modified:
mgmt/cumin/python/wooly/forms.py
Log:
Introduces text input widgets that have specific types of parameters.
Modified: mgmt/cumin/python/wooly/forms.py
===================================================================
--- mgmt/cumin/python/wooly/forms.py 2007-10-16 17:39:02 UTC (rev 1092)
+++ mgmt/cumin/python/wooly/forms.py 2007-10-16 17:50:35 UTC (rev 1093)
@@ -100,6 +100,8 @@
def __init__(self, app, name, form):
super(TextInput, self).__init__(app, name, form)
+ # XXX remove this once we move clients of this class to
+ # StringInput
self.set_parameter(Parameter(app, "param"))
self.add_parameter(self.get_parameter())
@@ -111,6 +113,24 @@
def render_size(self, session, object):
return self.size
+class StringInput(TextInput):
+ def __init__(self, app, name, form):
+ super(StringInput, self).__init__(app, name, form)
+
+ self.set_parameter(Parameter(app, "param"))
+ self.add_parameter(self.get_parameter())
+
+ self.set_size(30)
+
+class IntegerInput(TextInput):
+ def __init__(self, app, name, form):
+ super(IntegerInput, self).__init__(app, name, form)
+
+ self.set_parameter(IntegerParameter(app, "param"))
+ self.add_parameter(self.get_parameter())
+
+ self.set_size(15)
+
class CheckboxInput(FormInput):
def __init__(self, app, name, form):
super(CheckboxInput, self).__init__(app, name, form)
More information about the rhmessaging-commits
mailing list