Hitachi Vantara Pentaho Community Wiki
Child pages
  • 03. XUL 1.0 Extensions and the Pentaho XUL Namespace
Skip to end of metadata
Go to start of metadata

XUL 1.0 Extensions and the Pentaho XUL Namespace

The Pentaho XUL Specification Extension adds extra functionality and components that do not exist in the Mozilla XUL 1.0 specification. These Pentaho-specific elements are explained in later portions of this guide. In order to use them, you must use the Pentaho namespace prefix:

http://www.pentaho.org/2008/xul

This must be placed in the top level node in your XUL document with a namespace prefix, along with the default XUL namespace:

<window id="general-datasource-window"
    title="Database Connection"
    orient="vertical"
    height="605" width="700"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:pen="http://www.pentaho.org/2008/xul" >
...

If another engine processes a XUL file that contains Pentaho-specific XUL extensions without calling the Pentaho namespace, or if the appropriate handlers are not available for the extended references, then the XUL engine will ignore those attributes and elements.

Extension Attributes Defined for All XUL Elements

The following attributes are common extensions to all XUL elements:

The customclass attribute allows you to override one of the standard component rendering classes with a custom class for that element. The String value of the customclass element should be the name of the handler that is mapped to the custom classname in the framework's loading engine.

customclass is required to implement the same interface that the standard element implements, in order to keep the functional code clean (without references to the custom components). For example, consider the following definition:

<label id="custom-url-label" value="Custom Connection URL:" />
<textbox pen:customclass="variabletextbox" id="custom-url-text" />

Since the XUL textbox element renders an implementation of the XulTextbox interface, then the class that the variabletextbox name maps to must also implement the XulTextbox interface. For an understanding of what interfaces are implemented for which elements, download the source and inspect the implementations of the XulLoader interface. The XulLoader impl classes hold the references to the handler mappings. This is the most common way to inject a customized component into the framework.

  • No labels