NullRef when going to edit mode

Jun 28, 2012 at 10:41 AM

When I click edit on my Individual entity in the UI, I get the below error.
So something is unexpectedly null?
Could it not spit out the name of the property it is trying to access with GetTextField?
I tried the debug logs also, but couldn't find error details.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 27:                                 FormMethod.Post,
Line 28:                                 new {@class = IdHelper.EditName})) {%>
Line 29:             <%:Html.PropertyListEdit(Model)%>     
Line 30:             <%}%>
Line 31:             


Source File: c:\Inivit\SMD_All\SmdCore\SMD.CoreMvcRunner\Views\Shared\ObjectEditControl.ascx    Line: 29

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   NakedObjects.Web.Mvc.Html.CommonHtmlHelper.GetTextField(HtmlHelper html, PropertyContext propertyContext, String id, String tooltip, Boolean readOnly) +613
   NakedObjects.Web.Mvc.Html.CommonHtmlHelper.GetEditValue(HtmlHelper html, PropertyContext propertyContext, IEnumerable`1 childElements, Boolean addToThis, Boolean noFinder) +899
   NakedObjects.Web.Mvc.Html.CommonHtmlHelper.EditObjectField(HtmlHelper html, PropertyContext propertyContext, Boolean noFinder, IEnumerable`1 childElements, String idToAddTo) +121
   NakedObjects.Web.Mvc.Html.<>c__DisplayClass41.<EditObjectFields>b__31(INakedObjectAssociation property) +115
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +85
   System.Linq.<UnionIterator>d__88`1.MoveNext() +281
   System.Linq.<UnionIterator>d__88`1.MoveNext() +281
   NakedObjects.Web.Mvc.Html.ElementDescriptor.BuildElementSet(IEnumerable`1 elements) +212
   NakedObjects.Web.Mvc.Html.CommonHtmlHelper.AddClassAndIdToElementSet(IEnumerable`1 elements, String cls, String id) +44
   NakedObjects.Web.Mvc.Html.CommonHtmlHelper.BuildEditContainer(HtmlHelper html, INakedObject nakedObject, IEnumerable`1 elements, String cls, String id) +50
   NakedObjects.Web.Mvc.Html.PropertyExtensions.PropertyListEdit(HtmlHelper html, Object domainObject) +274
   ASP.views_shared_objecteditcontrol_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Inivit\SMD_All\SmdCore\SMD.CoreMvcRunner\Views\Shared\ObjectEditControl.ascx:29
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +56
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060