[rhmessaging-commits] rhmessaging commits: r2292 - mgmt/trunk/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Tue Aug 12 19:40:58 EDT 2008
Author: eallen
Date: 2008-08-12 19:40:57 -0400 (Tue, 12 Aug 2008)
New Revision: 2292
Modified:
mgmt/trunk/cumin/python/cumin/queue.py
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Implemented a post_process method to allow the form to clear out any parameters after it is rendered
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2008-08-12 23:37:43 UTC (rev 2291)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2008-08-12 23:40:57 UTC (rev 2292)
@@ -355,6 +355,9 @@
return (errors or super_error, form_binding_info)
class QueueAdd(QueueForm):
+ def post_process(self, session):
+ self.bindings.post_process(session)
+
def process_cancel(self, session):
branch = session.branch()
self.frame.show_view(branch)
@@ -525,6 +528,9 @@
return "<ul class=\"errors\" style=\"margin:0; float:left;\"><li>%s</li></ul>" % \
"</li><li>".join(errors["no_exchanges"])
+ def post_process(self, session):
+ self.bindings.post_process(session)
+
def process_cancel(self, session):
branch = session.branch()
self.frame.show_view(branch)
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-08-12 23:37:43 UTC (rev 2291)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-08-12 23:40:57 UTC (rev 2292)
@@ -156,6 +156,8 @@
self.process_submit(session, *args)
else:
self.process_display(session, *args)
+
+ self.post_process(session, *args)
def process_cancel(self, session, *args):
pass
@@ -166,6 +168,9 @@
def process_display(self, session, *args):
pass
+ def post_process(self, session, *args):
+ pass
+
def render_cancel_content(self, session, *args):
return "Cancel"
@@ -347,14 +352,14 @@
def get_items(self, session):
return self.__states
- def render_item_link(self, session, state):
+ def render_item_link(self, session, state, id=id):
branch = session.branch()
self.set(branch, state)
title = self.__titles[state]
class_ = self.get(session) == state and "selected"
- return fmt_link(branch.marshal(), title, class_)
+ return fmt_link(branch.marshal(), title, class_, id=id)
class UnitSwitch(StateSwitch):
def __init__(self, app, name):
More information about the rhmessaging-commits
mailing list