dotvvm icon indicating copy to clipboard operation
dotvvm copied to clipboard

IncludedInPage with resource binding to _control property doesn't work

Open tomasherceg opened this issue 3 years ago • 1 comments

I've tried markup controls with the @property directive, but I am getting NullReferenceException in Render method when the property is passed to IncludedInPage via resource binding on _control.SomeProperty.

@property bool ShowDescription

<p IncludeInPage="{resource: _control.ShowDescription}">test</p>

The exception: dotvvm-error-NullReferenceException.zip

tomasherceg avatar Sep 21 '22 11:09 tomasherceg

It happens because the property isn't assigned and it's default value is null. I'll fix the default value, and IMHO it would make sense to make properties without defined default required.

exyi avatar Sep 28 '22 11:09 exyi