Name
WEB-INF/lps/lfc/glue/LaszloInitiator.lzs
Description
An application source file contains XML that describes a view that
will be instantiated when the application is loaded. These XML
elements are called view templates, and occur either directly
within the document root, or within another view template. A root
view template is a view template that occurs directly within the
document root.
The interface compiler compiles each root view template into
ActionScript bytecodes that, when executed, create an instance of
the object that the XML element describes. It does this by
appending to the output file instructions to push a succint
description of the XML hierarchy onto the stack, followed by a call
to LzInstantiateView (below) with the runtime representation of the
root view template as its argument.
The format of the runtime representation is documented in the
Javadoc for org.openlaszlo.ic.ScriptCompiler.xmlToScript. In
brief, an XML element is compiled to a runtime object with the
following attributes:
tagName: The element, or tag name (e.g. "window")
attrs: An object whose properties are attributes, e.g.
{title: "Contacts", x: 10, y: 20}
children: An array of child elements.