Client specific code for the Barefoot.Router. The complete view object restoration when receiving pre-rendered UI’s from the server is handled in the start method.
Barefoot. | Client specific code for the Barefoot.Router. |
Functions | |
preInitialize | Ensure that the setupRequestContext function is saved into the router for later use. |
start | When the application is coming up, this method gets called from Barefoot.Startup.Client. |
render | Calls the <Barefoot.View.Shared.render> method of the passed Barefoot.View. |
function start()
When the application is coming up, this method gets called from Barefoot.Startup.Client.
It handles mainly the restoration of the view objects after receiving an already rendered UI from the server. This process consists of the following steps:
Another important step is the deserialization of the DataStore if the backend serialized a it into the DOM before. The particular global function is called and the result injected into the clients own DataStore. For the serialization code see Barefoot.Router.Server.render.
function render( view )
Calls the <Barefoot.View.Shared.render> method of the passed Barefoot.View. If another view was rendered before, Barefoot.View.Client.close gets called to properly remove that view from the DOM before rendering the new view.
(Barefoot.View) view | Barefoot.View to render into the DOM. |
Ensure that the setupRequestContext function is saved into the router for later use.
function preInitialize( options )
When the application is coming up, this method gets called from Barefoot.Startup.Client.
function start()
Calls the Barefoot.View.Shared.render method of the passed Barefoot.View.
function render( view )
This function initiates the rendering of the passed view.
function render( view )
Removes a view from the DOM and ensures that all events of the view itself and its subviews are removed too.
function close()