SharePoint: An update on IRuntimeFilter

A few weeks ago I posted on the IRuntimeFilter interface in SharePoint. Here are a few updates…

1) I’ve validated that IRuntimeFilter’s CheckRuntimeRender() method is only called when the IsIncludedFilter property of a web part is non-null.

2) By default, Windows SharePoint Services will put administrators and web designers into a shared page view rather than in a my page view.  The net effect is that the shared page isn’t a personalized view and therefore IRuntimeFilter’s CheckRuntimeRender() method isn’t called.  To fix this create a new site definition and add the following tag into the <HEAD> tag.  <META name=”WebPartPageDefaultViewPersonal”>  Then make sure you do an IISReset so it can take effect.  (You’ll have to create a new site to see this.)

Help Your SharePoint User

3) ValidateRuntimeFilter() is called everytime the web part is serialized — which is often.  So keep the code that you write in this method very simple.

4) If you decide to do post backs in the chooser form that you create, you’ll need to add a tag to the <HEAD> tag.  That tag is <base target=”_self”>  If you don’t do this then the form will cause a new window to open.

My next step is to fix some impersonation issues with roles (the ones that Michael Donovan mentioned to in his post.  From there, I’ll be writing a IRuntimeFilter chain to allow the Portal audiences IRuntimeFilter to run side-by-site with our own IRuntimeFilter.