Skip to content
Anand Doshi edited this page May 17, 2013 · 3 revisions

Creating a New Document (Doc)

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