Steps to Reproduce
run the attached example
click either button 3 times (toggles the editor template on/off/on)
Actual Result
A) and C) cause NPE when trying to render an editor template for the second time
B) and D) show workarounds not causing the issue
Expected Result
creating, detaching, recreating a template should not cause an Exception
Debug Info
this only happens when children-binding or model-binding are used in combination with a form-binding
Root Cause
I assume when detaching the grid/div the form or model/children binding doesn't clean up properly causing a problem when initializing a form with the same id again
Workaround
included in the example, using <forEach> instead of model/children-binding avoids the error