[rhmessaging-commits] rhmessaging commits: r2735 - mgmt/trunk/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Nov 4 14:59:26 EST 2008


Author: eallen
Date: 2008-11-04 14:59:26 -0500 (Tue, 04 Nov 2008)
New Revision: 2735

Modified:
   mgmt/trunk/cumin/python/cumin/brokerlink.py
Log:
Using new general two radiobutton options class for SaveField

Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py	2008-11-04 19:56:03 UTC (rev 2734)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py	2008-11-04 19:59:26 UTC (rev 2735)
@@ -491,7 +491,7 @@
         self.host = DictParameter(app, "host")
         self.add_parameter(self.host)
 
-        self.durable = SavedField(app, "saved")
+        self.durable = self.SavedField(app, "saved")
         self.add_field(self.durable)
         
         self.errors = self.Errors(self, "errors")
@@ -611,6 +611,19 @@
         def get_default(self, session):
             return dict()
         
+    class SavedField(TwoOptionRadioField):
+        def __init__(self, app, name, option1="notsaved", option2="saved"):
+            super(BrokerLinkAdd.SavedField, self).__init__(app, name, option1, option2)
+
+            self.option1_title = "No, do not restore if broker restarts"
+            self.option2_title = "Yes, restore if broker restarts"
+
+        def render_title(self, session):
+            return "Restore if broker restarts?"
+        
+        def render_field_help(self, session):
+            return "(Should the added configuration be durable)"
+
 class BrokerSetClose(CuminBulkActionForm):
     def process_return(self, session):
         branch = session.branch()




More information about the rhmessaging-commits mailing list