SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs



Add to Technorati Favorites

Jul 162010

CKS:EBE 3.0-Enhanced Blog Edition 3.0

Like many other blogs running SharePoint, my blog uses the EBE to add more functionality to the default SharePoint blog.

And since I am one of the developers of the EBE 3.0, I’m glad that we announce the release of the next release. Version 3 brings along many new features and improvements of already implemented features.

New Features
*Ability to theme wiki pages
*Ability to export post to PDF
*Localization (French, Spanish)
*Technorati Links from post categories
*Ability to bookmark post with Twitter
*Centralized Theming - Ability to create a theme library at the root and allow sub blog sites to use the common theme library.
*The ability to add an XML feed control
*Logging of pingbacks and trackback errors to SharePoint Logs directory
*Support of feature stapling
*Preliminary SharePoint 2010 Beta 3 compatible (with web.config edits)
*EBE caching and performance validation
*Performance increases for page loads less than <3 sec
Note: Some features are specific to certain themes

Enhancements
*Caching enhancements
*Added caching to XML controls
*Added enhanced XSL caching
*Ability to exclude the EBE HttpModule from specific paths
*Auto-Discovery for Live Writer metaweblog api
*Tweaks and enhancements to all themes
*Ability to sign-in after denied access to system pages
*Posts with future date are now hidden from posts list
*Browser title now matches post titles
*Comments are not added if they are spam

Read the release notes here: http://cks.codeplex.com/releases/view/28520


Published: 7/16/2010  12:06 PM | 1  Comment | 0  Links to this post
Tagged as: CKS EBE, CodePlex, SharePoint, Development

Jun 072010

SPListItem.GetItemByUniqueId

Did you know you can fetch an item by its UniqueId even if it is in the recycle bin?

You can even update its data while it is already recycled. I wonder if there is a scenario, where you would want to modify an already recycled ListItem…


Published: 6/7/2010  11:36 AM | 0  Comments | 0  Links to this post
Tagged as: SharePoint, Development

May 212010

SharePoint 2010 SDK

The Microsoft SharePoint 2010 Software Development Kit (SDK) contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on SharePoint 2010 products and technologies.

You can grab it here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f

The download contains the SDK for SPF and SPS. No need to download two separate files anymore.

The SharePoint Developer Center can be found here: http://msdn.microsoft.com/en-us/sharepoint/default.aspx


Published: 5/21/2010  7:56 AM | 0  Comments | 0  Links to this post
Tagged as: SharePoint, Development

Apr 032010

The IWebPartField Interface versus the ASP.NET Lifecycle

A Webpart receives a filter value through the IWebPartField interface. The example over at MSDN was simple and clean. So I adopted the code to my Webpart.

A common scenario would be to create controls based on the received filter value. E.g. query a list for the passed filter value, and display the item from the query.ASP.NET Lifecycle

Problem

From the ASP.NET Lifecycle we know how to deal with controls. Create them in CreateChildControls, assign values in OnPreRender and let them being rendered in RenderContents. Now we have a problem. The passed value in our Webpart is not available at any place, where we can still add controls to the page. If we try to do in RenderContens, they are not shown. It’s too late.

The example stores the passed value in

private object _fieldValue;

On OnPreRender a method is called, which will process the filter data.

protected override void OnPreRender(EventArgs e)
{
   if (_provider != null)
   {
      _provider.GetFieldValue(new FieldCallback(GetFieldValue));
   }
   base.OnPreRender(e);
}

The example will render the received value in RenderContents

protected override void RenderContents(HtmlTextWriter writer)
{
   if (_provider != null)
   {
      PropertyDescriptor prop = _provider.Schema;

      if (prop != null && _fieldValue != null)
      {
         writer.Write(prop.DisplayName + ": " + _fieldValue);
      }...

Unfortunately this is too late for me. As stated above, you can’t add controls to the Controls collection of a page/Webpart anymore.

Solution

As soon as the value is being received from the Webpart connection, we use it to create controls or do stuff with it before the lifecycle reaches Render.

Instead of the private field _fieldValue, I used a property “FieldValue” with a backing field “_FieldValue”. The setter of the property assigns the new value to _FieldValue and triggers another method which will create controls. Assigning the value is just before Render.

private object _FieldValue
public object FieldValue 
{ 
   get { return _FieldValue; } 
   set
   { 
      _FieldValue = value; 
      DoStuff();
   }
}

Published: 4/3/2010  11:22 AM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint