Sorry if this is a dead horse that's being resurrected, I just got
thinking about it though.

I've read this in regards to stateless widgets

http://docs.turbogears.org/1.0/StatelessWidgets
http://groups.google.com/group/turbogears/tree/browse_frm/thread/74926e779c1da137/0189b1618e09b9c4

Whilst I can understand the use of using widgets in a stateless
manner, none of the arguments seem to really
give me a good reason why not to create various instances of the same
widget (apart from the validate decorator issue). The other reasons
are a bit wishy washy and somewhat dogmatic (no offence intended).

One of the reasons I don't always rely on stateless widgets is that
sometimes I may be wanting to use a large number of variable
attributes(I'm talking about 20+ perhaps) for the one widget.
This means that each time I return from my controller with the widget
I have to pass all those variables as well.
I find it easier (both to code and to read) to create the instance
with all the vars in the controller, then simply return the widget,
rather that to return the slew of vars as well and then account for
them in the template where the display() is called.

Am I a bad person for thinking about widgets in this manner? Are there
other caveats I am missing?

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en.

Reply via email to