protected override void Serialize(IDictionary <string, object> json) { if (ContentId.HasValue()) { json["content"] = new ClientHandlerDescriptor { HandlerName = string.Format("$('{0}{1}').html()", IdPrefix, ContentId) }; } else if (Content.HasValue()) { json["content"] = Content; } if (EmptyId.HasValue()) { json["empty"] = new ClientHandlerDescriptor { HandlerName = string.Format("$('{0}{1}').html()", IdPrefix, EmptyId) }; } else if (Empty.HasValue()) { json["empty"] = Empty; } }