Author: eallen
Date: 2008-11-15 17:24:26 -0500 (Sat, 15 Nov 2008)
New Revision: 2807
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Made StateSwitch param public so the default can be changed
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-11-15 00:38:08 UTC (rev 2806)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-11-15 22:24:26 UTC (rev 2807)
@@ -519,8 +519,8 @@
def __init__(self, app, name):
super(StateSwitch, self).__init__(app, name)
- self.__param = Parameter(app, "param")
- self.add_parameter(self.__param)
+ self.param = Parameter(app, "param")
+ self.add_parameter(self.param)
self.__states = list()
self.__titles = dict()
@@ -533,14 +533,14 @@
self.__hover[state] = hover
self.__bookmark[state] = bm
- if self.__param.default is None:
- self.__param.default = state
+ if self.param.default is None:
+ self.param.default = state
def get(self, session):
- return self.__param.get(session)
+ return self.param.get(session)
def set(self, session, value):
- foo = self.__param.set(session, value)
+ foo = self.param.set(session, value)
return foo
def get_items(self, session):
@@ -559,7 +559,7 @@
""" needed because the SubmitSwitch class uses
a hidden input to set the param value instead
of a link name/value pair """
- return self.__param.path
+ return self.param.path
def render_item_link(self, session, state):
branch = session.branch()
Show replies by date