[Grok-dev] Viewlets and viewletmanagers

Martijn Faassen faassen at startifact.com
Wed Apr 15 11:46:17 EDT 2009


Jan-Wijbrand Kolman wrote:
> Souheil CHELFOUH wrote:
>> """if you specify a context on the ViewletManager, you should get this
>> context as the default context for the Viewlet itself.
>> Of course, that doesn't prevent you to specify one on the Viewlet
>> itself, but, it would spare the tedious job to redefine, each time, a
>> base context for the Viewlets.
>> I have this case where, very often, the manager and the viewlets are
>> registered for the same context. Actually, it's 90% of my cases."""
> 
> Do you mean the viewlet should - by default - be registered for the same
> context as the viewletmanager the viewlet is associated too?
> 
> IMHO that would make sense indeed.

I haven't followed this discussion in detail, but I do have some input: 
I remember when we first implemented viewlets I struggled quite a bit 
with what they should associate with by default and couldn't figure it 
out. I don't think I thought of this option yet.

I'm fine with making such a modification in grokcore.viewlet. Do make 
sure that the tests still work and add new tests. If you need to 
*modify* the tests (meaning the existing behavior changes), we need to 
write good upgrade notes that tell people what changed and what they 
should do.

Soheil, are you a svn.zope.org contributor? If not and you'd like to be 
able to contribute, please read this:

http://www.zope.org/DevHome/Subversion/ImpatientPeoplesGuideToRequestingCommitPrivileges

Regards,

Martijn



More information about the Grok-dev mailing list