July 2009 Entries
Download the source code for this project here Over the last 2 posts in this series we’ve looked at creating a new field type to handle Xml data. We’ve created a basic implementation and added a custom user interface to make editing the data a bit more friendly. In this article we’ll look at using XSD and XSLT data to provide a higher level of data validation and to give a greater degree of control over how our data is displayed within SharePoint. Previously most of the code that we’ve added has been to the BaseXmlField and SPFieldXmlBase...
Download the source code for this project here
In this article we described an Xml field type that could be used for storing Xml and Xml-derived data in a SharePoint list. We got as far as creating a skeleton object that provides the basic functionality of a custom field. In this post we’ll add a custom user interface to make editing Xml data a bit more friendly.
In order to generate a responsive UI I’ve made use of two client side technologies:
JQuery - specifically the Dialog functionality of JQuery UI
CodeMirror – specifically the...
Download the source code for this project here One of the clever features of WSS 3.0 and MOSS is the ability to create custom field types. These allow you to determine exactly how information is displayed and edited within your SharePoint site. There are a number of excellent articles out there covering how to implement this functionality, such as Nick Sevens article. However, I’ve found that in order to build configurable applications in SharePoint, storing XML and other XML-based data in fields is extremely powerful. It’s my aim in this post to explain how to create a custom...
When creating custom fields in SharePoint you may encounter the following error: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPSimpleItem.get_Xml()
at Microsoft.SharePoint.ApplicationPages.FieldNewPage.Save()
at Microsoft.SharePoint.ApplicationPages.FieldNewPage.BtnOk_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
After much investigation it seems that when inheriting from SPField, it’s necessary to override FieldTypeValue since the base implementation of...
After much deliberation, procrastination and just plain configuration, I've finally made a start on a blog. Hopefully this'll be the first of many posts detailing the trials and tribulations of my working life as a developer.
Blogging has always seemed to me to be an activity for those with time to spare or an axe to grind. Having had neither, I've never really gotten into it. However, a few years ago I was working with a hardened blogger who pointed out that one of the added benefits of blogging is that over time, you'll create an archive of the problems that you've...