echoxul.view.builder
Class ComponentEchoXULElement

java.lang.Object
  extended byechoxul.xom.XULNode
      extended byechoxul.xom.XULElement
          extended byechoxul.view.builder.AbstractEchoXULElement
              extended byechoxul.view.builder.ComponentEchoXULElement

public class ComponentEchoXULElement
extends AbstractEchoXULElement

This EchoXULElement implementation is responsible for creating physical Echo Components from corresponding XUL element declarations. This involves locating the correct Java class to instantiate and setting appropriate properties on it.

Java Class resolution - The Java class implementing this component is found by taking a combination of the namespace and name into account. The namespace must start with "echo:". The string following the "echo:" prefix is taken to be the java package name. The class name is derived from the element name in the following way. The first character is converted to upper-case. Also, any dash followed by a letter is removed and replaced with the single uppercase character following the dash. In this way, the class name ListBox could be written as is in the XUL or as "list-box", which is more in line with XUL naming conventions.

Author:
Terry Laurenzo

Constructor Summary
ComponentEchoXULElement()
           
 
Method Summary
 nextapp.echo.Component createComponent(BuilderContext context)
          This method is called to create the Echo component which is represented by this XUL definition.
protected  void processChildren(nextapp.echo.Component comp, BuilderContext context)
          Recursively create children
protected  void setBeanProps(nextapp.echo.Component comp, BuilderContext context)
          Uses Jakarta Commons BeanUtils to dynamically discover and set java bean properties.
 
Methods inherited from class echoxul.view.builder.AbstractEchoXULElement
filterDefaultAttributeName, getBindingName, newException
 
Methods inherited from class echoxul.xom.XULElement
addChild, dump, dumpChildren, getAttributes, getChildren, getCssClasses, getDocument, getId, getName, getNamespace, getParent, hasChildren, init, lockChildren, setParameters, supportsChildren
 
Methods inherited from class echoxul.xom.XULNode
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentEchoXULElement

public ComponentEchoXULElement()
Method Detail

createComponent

public nextapp.echo.Component createComponent(BuilderContext context)
Description copied from class: AbstractEchoXULElement
This method is called to create the Echo component which is represented by this XUL definition. It should recursively call its children as necessary.

Specified by:
createComponent in class AbstractEchoXULElement
Parameters:
context - for manipulating the resource hierarchy.
Returns:
Newly created Echo Component

setBeanProps

protected void setBeanProps(nextapp.echo.Component comp,
                            BuilderContext context)
Uses Jakarta Commons BeanUtils to dynamically discover and set java bean properties.

Parameters:
comp -
context -

processChildren

protected void processChildren(nextapp.echo.Component comp,
                               BuilderContext context)
Recursively create children

Parameters:
comp -
context -


Copyright © 2004 Terry Laurenzo. All Rights Reserved.