TemplatedWidget's subclass TemplatedDialog makes use of jQuery UI Dialog to create in-page modal dialogs.
Unlike other widget types TemplatedDialog creates its own HTML element, which it will be atteched to.