modelsbuilder / ModelsBuilder.Original

The Community Models Builder for Umbraco
MIT License
114 stars 49 forks source link

Does not strong type Textbox Multiple #28

Closed BarryFogarty closed 9 years ago

BarryFogarty commented 9 years ago

TextboxMultiple results in an a property of type object rather than string.

zpqrtbnk commented 9 years ago

The ModelsBuilder checks the property value converters to figure out the CLR type that they return, and decide what the property CLR type should be. Core does not ship with a converter for textbox multiple, and so ModelsBuilder uses the default CLR type, which is object.

Nothing much we can do at ModelsBuilder level - you need to add a property value converter for textbox multiple somewhere in your code - one that declares it returns either a string, or an IHtmlString.

Adding such a converter to Core would make sense of course, but would break backward compatibility - so that should happen at a point in time (v8) but not right now.

BarryFogarty commented 9 years ago

Thanks for the explanation Stephan, makes sense.