WARNING: This tutorial is being written! Do not hesitate to report any errors or suggestions.
Quick access:
The various stages of the life cycle
Ellipse is qualified of "framework": this is not just a library of Web application development, but this really a development system of web applications imposing a strong frame of programming. Among the different items imposed by this framework, we can mention the life cycle of a web page. This life cycle imposes the invocation of particular methods at any strong moments of the treatment cycle of the web page. The chart below attempts to synthesize this life cycle.
To better understand the situation, we will now resume one by one the different points of the life cycle of an Ellipse page.
corelib.services.web.webapplications.WebPage).
It is not advisable to use the manufacturer: at this stage, the object is not yet linked to the definition file of the web page (extension .wp).
<include file="partOfPage.wp" />). The inclusion is in
reality taked by merging the differents DOM (Document Object Model), to finally have a single DOM representing the complete Ellipse webpage.
The fusion is obtained by a simply cloning of the XML tags, identically, in the main page.
<corelib.services.web.components.Button />).
The Ellipse framework also seeks to inject the tags' attributes of the WEB components in the attributes of your web components request on the basis of
the javaBeans model.
corelib.services.web.webapplications.DataRepeater (the repeaters of web components),
we attempt to clone the web components they contain. As a standard, the repeaters of components are linked to datas in session
or stored in the application. For all the duplicated components, the identifiers of web components (property id) are modified
to ensure the uniqueness of each of them (the repetition index is associated with them).
component_init is invoked on each of the web components. Warning: At this stage you don't yet have access to the linked datas
(through the Data Binding), nor to the submitted datas through a form (except, of course, through the object request -
javax.servlet.http.HttpServletRequest).
page_init is invoked on your webpage. Warning: At this stage you don't yet have access to the linked datas (through the
data Binding), nor to the submitted datas through a form (except, of course, through the object request -
javax.servlet.http.HttpServletRequest).
component_load is invoked on each of the web components.
page_load is then invoked on the page. Conventionally, it is in this way that you encode the registration of the
listeners on the web components of the page (the event model proposed by the framework).
WebComponentEventLevel.FIRST, BEFORE, DEFAULT, AFTER and
LAST).
page_preRender is invoked on the web page considered. While some final adjustments are necessary, it is still
possible to react.
page_render is invoked. It has a responsibility to make cascading the request of generating HTML flow on the root tag
of the DOM and its associated Web component (usually it is the component <web:Html>).
component_preRender is invoked on a component to inform him that it is about to be asked to take
instructs its visual rendering.
component_renderBegin must generate the HTML code associated with the opening tag of the Web component considered.
component_renderChildren must generate the HTML code associated with the contents of the Web subfeatures considered. It is not
necessarily need to recode this method. Its implementation in the classroom VisualComponent will suffice in most cases. In the case
of the component contains any Web subfeatures, the default implementation returns to the method component_preRender,
component_renderBegin, component_renderChildren, component_renderEnd and component_postRender
and that for all the sub-components.
component_renderEnd must generate the HTML code associated with the closing tag of the Web component considered.
component_postRender is invoked to indicate to the Web component in question, that its work of HTML flow generation is finished.
page_postRender is invoked to indicate that the generation of the HTML flow associated with the webpage is finished.
finalize will finally be used.
|
|
|||||||