I like the new TwoOptionRadioField, but it has a flaw imo: the titles need to come from a
dynamic context, because when we do localization, the static ones below won't
"switch" properly.
Instead, I recommend:
def render_title_1(session, *args):
pass
def render_title_2(session, *args):
pass
I know there are other places where we have static strings like that, but I hope we can
shrink the number of those over time, because when we do i18n, we'll have lots of fix
ups to do.
----- Original Message -----
From: rhmessaging-commits(a)lists.jboss.org
To: rhmessaging-commits(a)lists.jboss.org
Sent: Saturday, November 8, 2008 12:48:37 PM GMT -05:00 US/Canada Eastern
Subject: [rhmessaging-commits] rhmessaging commits: r2767 -
mgmt/trunk/cumin/python/cumin.
+ class DynamicField(TwoOptionRadioField):
+ def __init__(self, app, name, option1="yes", option2="no"):
+ super(BridgeAddForm.DynamicField, self).__init__(app, name, option1,
option2)
+
+ self.option1_title = "Dynamic"
+ self.option2_title = "Not dynamic"
+ self.param.default = option2