corelib.services.web.components
Class WebComponent

java.lang.Object
  extended by corelib.services.web.components.WebComponent
Direct Known Subclasses:
ChoiceElement, DataGridColumn, Datum, DiagramView, MailingFilter, Model, ResourceBundle, VisualComponent

public abstract class WebComponent
extends java.lang.Object

A web component is a object with a life cycle management. In this life cycle, after the complete initialisation of this attributes, the component_load method is invoked.

Since:
0.1.0
Author:
Dominique Liard

Field Summary
protected  java.util.ArrayList<BindingExpression> dataBindings
           
protected  WebPage webPage
           
protected  org.w3c.dom.Element xmlNode
           
 
Constructor Summary
WebComponent()
           
 
Method Summary
 void addBindingExpression(BindingExpression bindingExpression)
           
 void addChildComponent(WebComponent webComponent)
          Adds a new web component as child of the current component.
 void component_init(WebPageEvent event)
          Fired when the web page begin his initialization.
 void component_load(WebPageEvent event)
          Fired when the web page is fully initialized.
 void component_preRepeaterDuplications(WebPageEvent event)
           
 java.util.List<WebComponent> getChildComponents()
           Returns all sub components defined in this web component.
 java.util.ArrayList<BindingExpression> getDataBinding()
           
protected  java.util.ArrayList<org.w3c.dom.Element> getElementsByTagName(java.lang.String namespace, java.lang.String tagName)
           
 java.lang.String getId()
           
 WebPage getWebPage()
          Returns the web page that contains this web component.
 org.w3c.dom.Element getXmlNode()
          Retreive the XML node, in the DOM (Document Object Model) of the page, associated to this WebComponent instance.
 void setId(java.lang.String identifier)
           
 void setWebPage(WebPage webPage)
          Changes the web page that contains this web component.
 void setXmlNode(org.w3c.dom.Element element)
          Set the XML node associated to this web component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataBindings

protected java.util.ArrayList<BindingExpression> dataBindings

xmlNode

protected org.w3c.dom.Element xmlNode

webPage

protected WebPage webPage
Constructor Detail

WebComponent

public WebComponent()
Method Detail

getXmlNode

public org.w3c.dom.Element getXmlNode()
Retreive the XML node, in the DOM (Document Object Model) of the page, associated to this WebComponent instance.

Returns:
the XML node (of type org.omg.dom.Element).
Since:
0.1.0

setXmlNode

public void setXmlNode(org.w3c.dom.Element element)
Set the XML node associated to this web component. This method can be executed only one time (else an exception will be thrown). The framework (with the web page model), invoke this method : this implied that you can't explicitly invoked this method.

Parameters:
element - the XML node to store in the web component.
Throws:
java.lang.RuntimeException - thrown if this method is invoked more one time.
java.lang.NullPointerException - thrown if the XML element is null.
Since:
0.1.0

getWebPage

public WebPage getWebPage()
Returns the web page that contains this web component.

Returns:
The web page that contains this web component.

setWebPage

public void setWebPage(WebPage webPage)
Changes the web page that contains this web component. Normally, you don't have to invoke this method.

Parameters:
webPage - The web page that contains this web component.

getId

public java.lang.String getId()

setId

public void setId(java.lang.String identifier)

getDataBinding

public java.util.ArrayList<BindingExpression> getDataBinding()

addBindingExpression

public void addBindingExpression(BindingExpression bindingExpression)

addChildComponent

public void addChildComponent(WebComponent webComponent)
Adds a new web component as child of the current component.

Parameters:
webComponent - The component to adds as child.

getChildComponents

public java.util.List<WebComponent> getChildComponents()

Returns all sub components defined in this web component.

This method not returns simple DOM elements that are not binded to a Java class. In consequence, if you want find all sub DOM elements, prefer the usage of component.getXmlNode().getChildNodes() statement.

Returns:
All sub components defined in this web component.
Since:
0.4.1

getElementsByTagName

protected java.util.ArrayList<org.w3c.dom.Element> getElementsByTagName(java.lang.String namespace,
                                                                        java.lang.String tagName)
Parameters:
namespace -
tagName -
Since:
0.3.1

component_preRepeaterDuplications

public void component_preRepeaterDuplications(WebPageEvent event)

component_init

public void component_init(WebPageEvent event)
Fired when the web page begin his initialization.

Parameters:
event - Qualify the current web page event.

component_load

public void component_load(WebPageEvent event)
Fired when the web page is fully initialized.

Parameters:
event - Qualify the current web page event.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.