Welcome  |  See it in Action  |  Documentation  |  Download 


Demos  
Updated with compressed JavaScript
Updated with milestone 2 code!

These examples demonstrate the core functionality of XAP applications:
  • Declarative UI - XML is used to create complex user interface
  • Declarative update - ability to modify an existing UI via XML
  • Server side event handling via XAL - work with any server that is capable of serving or generating XAL documents
  • Client side event handling using JavaScript code
These examples are using very simple styling - however CSS is fully supported and the look and feel can be customized as desired.

Demo Application: Updating Stock Quotes

This application provides simulated real time stock price information.

bullet Realtime Stock Ticker

This sample updates a table in real time using data generated on the server.  This sample uses Milestone 3 code.

Demo Application: Emergency Response System

This application is a simulated emergency response system that a user can view the location of ambulance, hospital and fire stations on a map, add/modify nodes and calcuate routes between different nodes.

All below samples and demos use Milestone 2 version.

bullet Emergency Response System (Showing extensibility and Integration with Google Maps)
XML View source file - index.xal
 View source file - EventMco.js

This application demonstrates the plugin architecture; this allows developers to create XML syntax that can than be used within applications. In this application an XML tag called "gMap" is used to allow very simple integration with a third party component.

Example Applications

Hello World

A simple XAP application.

bullet helloWorld
XML View source file - index.xal
html code View source file - index.html (this is the same for all examples)

Client Side Logic

Demonstrates connecting user interface events with Managed Client Objects (MCOs) written in JavaScript.
Note: issues have been reported on Mac OS X

bullet clientside-handler
XML View source file - index.xal
 View source file - MyHandler.js

Inline JavaScript

Demonstrates including JavaScript directly in a XAL document.

bullet inline-javascript
XML View source file - index.xal

Server Side Modification

This example shows usage of XModify as a server document to update the user interface asynchronously and declaratively.

bullet serverside-handler
XML View source file - index.xal
 View source file - MyHandler.js
XML View source file - hello-world.xal

Widget Examples

These applications demonstrate the available widgets provided by XAP.

bullet split-pane
XML View source file - index.xal

bullet tab-pane
XML View source file - index.xal

Initial Code Commit versions of the samples and demos

These links point to the initial milestone 1 (June 06) releases of the above sample and demonstration applications.

bullet helloWorld
bullet clientside-handler
bullet inline-javascript
bullet serverside-handler
bullet split-pane
bullet tab-pane
bullet Emergency Response System (Showing extensibility and Integration with Google Maps)

(last update - 12-Oct-06)

Copyright 2006 The Apache Software Foundation