Tags:
create new tag
, view all tags
-- PedroRio - 11 Oct 2012

XEO Components and Templating

Introduction

In order to improve the layout customization of existing applications, the concept of "templating" was added to (some) existing components and the creation of new "templatable" components is also allowed. This document explains all you need to know in order to use and create the new "templating" system.

In order to create a component (the old way) you need two classes:

  • The component class
  • The renderer class

The component class holds the properties of the component and the renderer is responsible for the HTML output. The rendering of a component is usually something like this:

_

w.startElement( DIV );
w.writeAttribute( ID, tabs.getClientId() );
w.writeAttribute( CLASS, "xwc-tabs" );
Iterator<UIComponent> childrenIterator = component.getChildren().iterator();
w.startElement( UL );
w.writeAttribute( CLASS, "xwc-tab-navbar" );

_

This meant that you had absolutely no chance of customizing the look and feel of a given component (apart from creating a new renderer for the said component component). With component templating the following scenario is possible when building a component:

  • Component class (with properties)
  • Component Renderer (can be optional)
  • Component Template (a file declaring how the component is rendered)

Template Syntax

_

Template Syntax Examples

_

Template Variables

_

Where to place your templates:

a

_

Template names/content

_

Including CSS and Javascript

_

Adhoc Template Processing

_

XEOObject / XEOList / Lov

_

Error in Template Processing

_

Encoding Children and Facets

_

Wrapper for XVWScripts

_

New Components

Edit | Attach | Print version | History: r22 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2012-10-11 - PedroRio
 

No permission to view TWiki.WebTopBar

This site is powered by the TWiki collaboration platform Powered by Perl

No permission to view TWiki.WebBottomBar