Author: eallen
Date: 2008-11-08 12:58:41 -0500 (Sat, 08 Nov 2008)
New Revision: 2774
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
Log:
Used new SubmitSwitch on ExchangeBinding widget
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-11-08 17:57:10 UTC (rev 2773)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-11-08 17:58:41 UTC (rev 2774)
@@ -1,6 +1,6 @@
from cumin.exchange import ExchangeInfo
from cumin.util import sorted_by
-from cumin.widgets import StateSwitch
+from cumin.widgets import SubmitSwitch
from formats import *
from wooly import Template, Writer, Attribute, Parameter, Widget
from wooly.forms import FormInput, FormField, Form
@@ -237,17 +237,13 @@
if m_info.endswith("nv"):
return this_exchange[m_info]
-class ExchangeState(StateSwitch):
+class ExchangeState(SubmitSwitch):
def __init__(self, app, name):
super(ExchangeState, self).__init__(app, name)
- self.add_state("c", "Active")
- self.add_state("a", "All")
+ self.add_state("c", "Active", bm="phase")
+ self.add_state("a", "All", bm="phase")
- def render_item_link(self, session, state):
- path = state == "a" and "state_all" or
"state_active"
- return super(ExchangeState, self).render_item_link(session, state, id=path,
bm="phase")
-
def is_all(self, session):
return self.get(session) == "a"
@@ -302,7 +298,8 @@
writer = Writer()
for exchange in sortedExchanges:
if ExchangeInfo.is_builtin(exchange) or \
- not (self.state.is_active(session) and not is_active(exchange)):
+ (not exchange._get_deletionTime() and \
+ not (self.state.is_active(session) and not is_active(exchange))):
# instance_key gives us a unique path for each exchange
# we will be rendering
instance_key = self.dict_param.get_instance_key(str(exchange.id))
Show replies by date