I'm getting a bizarre render error when trying to create a column based on a 
very simple custom fieldtype.

The problem seems limited to site column creation and a quick Google search 
brought up this thread which suggests it may be a bug introduced with SP2 and 
that's all I have to test in.

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/816f34eb-8231-4a05-b12a-fb89c4216257

Has anyone else seen this one before?

Source included below in the event I did anything obvious.

Field XML:

<?xml version="1.0" encoding="utf-8"?>
<FieldTypes>
  <FieldType>
    <Field Name="TypeName">Tag Field</Field>
    <Field Name="TypeDisplayName">Custom field for adding tags to list items 
and used by the Tag Cloud web part.</Field>
    <Field Name="TypeShortDescription">Tag Field</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="FieldTypeClass">TagField.TagField, TagField, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=9f4da00116c38ec5</Field>
    <PropertySchema>
      <Fields>
        <Field Name="Target" Type="Text" DisplayName="Page Target">
          <Default>/_layouts/OSSSearchResults.aspx?k=</Default>
        </Field>
        <Field Name="Separator" Type="Text" DisplayName="Character Separator">
          <Default>,</Default>
        </Field>
      </Fields>
    </PropertySchema>
    <RenderPattern Name="DisplayPattern">
      <HTML><![CDATA[<div id="__Tags]]></HTML>
      <Column Name="ID" HTMLEncode="TRUE" />
      <ListProperty Select="Name" />
      <HTML><![CDATA["></div>]]></HTML>
      <HTML><![CDATA[<script>var tags = ']]></HTML>
      <Column HTMLEncode="TRUE" />
      <HTML><![CDATA[';var splittedTags = tags.split(', ');]]></HTML>
      <HTML><![CDATA[for (var i = 0; i < splittedTags.length; i++){]]></HTML>
      <HTML><![CDATA[document.getElementById("__Tags]]></HTML>
      <Column Name="ID" HTMLEncode="TRUE" />
      <ListProperty Select="Name" />
      <HTML><![CDATA[").innerHTML+=']]></HTML>
      <HTML><![CDATA[<a href="]]></HTML>
      <HttpVDir />
      <FieldSwitch>
        <Expr>
          <Property Select="Target" />
        </Expr>
        <Case Value="">
          <HTML><![CDATA[/_layouts/OSSSearchResults.aspx?k=]]></HTML>
        </Case>
        <Default>
          <Property Select="Target" />
        </Default>
      </FieldSwitch>
      <HTML><![CDATA[' + splittedTags[i] + '">' + splittedTags[i] + 
'</a>&nbsp;';}</script>]]></HTML>
    </RenderPattern>
  </FieldType>
</FieldTypes>

Error description:

Object reference not set to an instance of an object. at 
Microsoft.SharePoint.WebControls.FieldProperty.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at Microsoft.SharePoint.WebControls.TemplateBasedControl.Render(HtmlTextWriter 
output)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at Microsoft.SharePoint.WebControls.TemplateBasedControl.Render(HtmlTextWriter 
output)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at Microsoft.SharePoint.WebControls.TemplateBasedControl.Render(HtmlTextWriter 
output)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at Microsoft.SharePoint.WebControls.TemplateBasedControl.Render(HtmlTextWriter 
output)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at 
ASP._controltemplates_inputformcontrol_ascx.__Render__control1(HtmlTextWriter 
__w, Control parameterContainer) in c:\Program Files\Common Files\Microsoft 
Shared\Web Server 
Extensions\12\TEMPLATE\CONTROLTEMPLATES\InputFormControl.ascx:line 15
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at 
ASP._controltemplates_inputformsection_ascx.__Render__control1(HtmlTextWriter 
__w, Control parameterContainer) in c:\Program Files\Common Files\Microsoft 
Shared\Web Server 
Extensions\12\TEMPLATE\CONTROLTEMPLATES\InputFormSection.ascx:line 67
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, 
ICollection children)
at 
Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter
 writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at 
Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter 
writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, 
Boolean includeStagesAfterAsyncPoint)



[cid:[email protected]]


Kind regards,

Paul Noone

---------------------------------------------------
Online Developer/Administrator
Information Communication and Technology
Catholic Education Office, Sydney
p: (02) 9568 8461
f: (02) 9568 8483
e: [email protected]<mailto:[email protected]>
w: http://www.ceosyd.catholic.edu.au/

<<inline: image002.jpg>>

_______________________________________________
ozmoss mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to