internal static ElementDescriptor ViewObjectField(this HtmlHelper html, PropertyContext propertyContext) { return new ElementDescriptor { TagType = "div", Label = html.GetLabel(propertyContext), Value = html.GetViewValue(propertyContext), Attributes = new RouteValueDictionary(new { id = propertyContext.GetFieldId(), @class = propertyContext.GetFieldClass() }) }; }
internal static ElementDescriptor EditObjectField(this HtmlHelper html, PropertyContext propertyContext, bool noFinder = false, IList<ElementDescriptor> childElements = null, string idToAddTo = null) { string editValue = html.GetEditValue(propertyContext, childElements, propertyContext.Property.Id == idToAddTo, noFinder); return new ElementDescriptor { TagType = "div", Label = html.GetLabel(propertyContext), Value = editValue, Attributes = new RouteValueDictionary(new { id = propertyContext.GetFieldId(), @class = propertyContext.GetFieldClass() }) }; }