On Dec 26, 2006, at 7:10 PM, Jorge Godoy wrote:
Alberto Valverde <[EMAIL PROTECTED]> writes:
3) I need to implement a way to signal all root widgets what template
language they're displaying on. The current implementation needs
manually
setting toscawidgets.framework.default_view in each request. That
is fine for
Pylons as the framework object only lives for one request... but
it's
problematic on TG 1.0b2 which keeps the same framework instance
for the whole
app's lifetime.
4) Some other minor tweaks here and there... (grep recursively
for "XXX" to
find out)
I'd like to see the possibility to send a complementary pair of
widgets so
that we can enclose other elements within them. This would be
useful for,
e.g., the Tabber widget:
class MyNewMegaFormWidgets(widgets.WidgetsList):
#
# widgets outside of tabs here
#
tabber_start = widgets.StartElement(
template = '<div class="tabber">')
tabbertab_start = widgets.StartElement(
template = '<div class="tabbertab">')
# # Other widgets inside this tab here
#
tabbertab_end = widgets.EndElement(
template = '</div>')
tabbertab_start = widgets.StartElement(
template = '<div class="tabbertab">')
# # Other widgets inside this tab here
#
tabbertab_end = widgets.EndElement(
template = '</div>')
tabber_end = widgets.EndElement(
template = '</div>')
#
# widgets outside of tabs here
#
If I were implementing that I'd also make a requirement that the
names be
"<something>_start" and that there's always a "<something>_end". The
generated names (id, classes, whatever) would use only the
"<something>" part,
without "start" or "end".
This can't be easily done with Kid (can it be done?) but I believe
that Genshi
would allow that more easily...
I'm afraid you can't have a genshi (nor kid) template consisting of a
single XML opening or closing tag (it's not well formed XML) so
neither tabber_start or tabber_end can be implemented as single
widgets. However, you can create a DIV FormFieldContainer widget
which has the correct css class so the tabber's javascript makes it
into a tab. The list tabber as the widget's javascript and it should
be included in every page automatically.
Alberto.
P.S Happy new year! ;)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---