incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Incubator Wiki] Update of "xap/ApplicationCreation" by Rob Gagne
Date Fri, 24 Nov 2006 19:14:16 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Incubator Wiki" for change notification.

The following page has been changed by Rob Gagne:
http://wiki.apache.org/incubator/xap/ApplicationCreation

------------------------------------------------------------------------------
  == 1. Deploying your own applications ==
  
- There are server elements that need to be properly configured in order to write your own
XAP applications.
+ There are several elements that need to be properly configured in order to write your own
XAP applications.
  
  === a. Location of Dojo ===
  
@@ -32, +32 @@

  <div context="../../" applicationName="SampleButton" startPage="index.xal" configFilePath="../../xap/config/XapConfig.js"></div>
  }}}
  
+ 
+ === Putting it all together ===
+ 
+ Your starting HTML page defines the frame and location of XAP.  This can be a full screen
div, or a smaller element within an existing page:
+ 
+ {{{
+ <html>
+     <head>
+         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+         <title>Sample Button</title>
+ 
+ 	<style type="text/css">
+ 		<!--
+ 		@import url(xap/css/xapDefault.css);
+ 		-->
+ 		body { margin: 5px; }
+         </style>
+     
+ 	  	<!-- Keep dojo from trying to scan this whole page for dojoType'd tags: -->
+ 	  	<script type="text/javascript">
+             djConfig = {
+                 parseWidgets: false,
+                 baseRelativePath: "xap/src/dojo/"
+             };
+         </script>    
+ 	
+         <script language="JavaScript" type="text/javascript" src="xap/lib/xapcore.js"></script>
+         <script language="JavaScript" type="text/javascript" src="src-js/DisplayUIDocument.js"></script>
+         
+         <script language="JavaScript" type="text/javascript">
+         	function onLoad(){
+         		Xap.createEmbeddedApplications();
+         	}    	
+         </script>
+     </head>
+   
+     <body onload="onLoad();">
+        <div applicationName="Sample" startPage="index.xal" configFilePath="xap/config/XapConfig.js"></div>
+     </body>
+ </html>
+ }}}
+ 
+ The XAL file defines the XAP application:
+ {{{
+ <xal xmlns="http://openxal.org/ui">
+   <mco xmlns="http://openxal.org/core/mco" id="testMCO" src="DisplayUIDocument"/>
+   <verticalBoxPane align="start" padding="3px" width="500px" height="500px" borderWidth="3px"
borderColor="blue" borderStyle="solid">
+     <label xmlns="http://openxal.org/ui/html" height="20px" text="Welcome to Nexaweb
Platform" fontSize="12px"/>
+     <button text="Display UI Document" width="200px" height="24px" onCommand="mco:testMCO.displayAlert(event)"/>
+   </verticalBoxPane>
+ </xal>
+ }}}
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message