Form Rendering - vjFaLk/frappe GitHub Wiki
Creating a New Document (Doc)
- Route is set to
app.html#Form/[DOCTYPE]/New DOCTYPE 1.
- Browser fires the
hashchange event.
haschange is bound in router.js to call wn.route method.
- Recognising that it is a Form which we are trying to open,
wn.route calls wn.views.formview.show
formview.show creates a new _f.Frm object, changes the container to point to this new form and calls its refresh method
refresh method of the form object calls setnewdoc
- Then, Following events are fired in sequence:
cur_frm.cscript.onload (when opening for the first time)
cur_frm.cscript.refresh
cur_frm.cscript.onload_post_render (if onload is called)