[rhmessaging-commits] rhmessaging commits: r3183 - mgmt/trunk/wooly/python/wooly.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Mar 19 17:57:59 EDT 2009
Author: justi9
Date: 2009-03-19 17:57:58 -0400 (Thu, 19 Mar 2009)
New Revision: 3183
Modified:
mgmt/trunk/wooly/python/wooly/demo.py
Log:
Add some content to the wooly demo main view
Modified: mgmt/trunk/wooly/python/wooly/demo.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/demo.py 2009-03-19 19:35:18 UTC (rev 3182)
+++ mgmt/trunk/wooly/python/wooly/demo.py 2009-03-19 21:57:58 UTC (rev 3183)
@@ -6,7 +6,11 @@
from wooly import Application
from wooly.server import WebServer
from wooly.pages import HtmlPage
+from wooly.widgets import *
+from wooly.resources import StringCatalog
+strings = StringCatalog(__file__)
+
class DemoServer(WebServer):
def authorized(self, session):
return True
@@ -66,5 +70,18 @@
def __init__(self, app, name):
super(DemoPage, self).__init__(app, name)
- def render_content(self, session):
- return self.app.model.incrementing_counter
+ main = MainView(app, "main")
+ self.add_child(main)
+
+class MainView(Widget):
+ def __init__(self, app, name):
+ super(MainView, self).__init__(app, name)
+
+ tabs = TabbedModeSet(app, "tabs")
+ self.add_child(tabs)
+
+ tabs.add_tab(ToggleDemo(app, "toggle"))
+
+class ToggleDemo(Widget):
+ def render_title(self, session):
+ return "Toggles"
More information about the rhmessaging-commits
mailing list