incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r430482 - in /incubator/xap/trunk/WebContent/examples/dojo: colorPicker.html dateAndColorPickers.html datePicker.html datePickerHandler.js dojo1.html dojo1Handler.js
Date Thu, 10 Aug 2006 19:00:00 GMT
Author: mturyn
Date: Thu Aug 10 11:59:59 2006
New Revision: 430482

URL: http://svn.apache.org/viewvc?rev=430482&view=rev
Log:
Added example with two xaplets, altered other examples to use the more generalised method
developed for that (in xapStatus.js q.v.).

Added:
    incubator/xap/trunk/WebContent/examples/dojo/dateAndColorPickers.html   (with props)
Modified:
    incubator/xap/trunk/WebContent/examples/dojo/colorPicker.html
    incubator/xap/trunk/WebContent/examples/dojo/datePicker.html
    incubator/xap/trunk/WebContent/examples/dojo/datePickerHandler.js
    incubator/xap/trunk/WebContent/examples/dojo/dojo1.html
    incubator/xap/trunk/WebContent/examples/dojo/dojo1Handler.js

Modified: incubator/xap/trunk/WebContent/examples/dojo/colorPicker.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/colorPicker.html?rev=430482&r1=430481&r2=430482&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/colorPicker.html (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/colorPicker.html Thu Aug 10 11:59:59 2006
@@ -49,7 +49,7 @@
 		dojo.require("dojo.widget.ColorPalette");  			                                        
 
  	</script>
 
-	<script language="JavaScript" src="colorPicker.js"> </script>
+	<script language="JavaScript" src="xapStatus.js"> </script>
 	<script language="JavaScript" src="colorPickerHandler.js"> </script>	
 
 
@@ -57,7 +57,7 @@
  
  </head>
   
- <body onload="divv=document.getElementById('dp') ;dojo.widget.createWidget('ColorPalette',{widgetId:'dp'},divv);Xap.scanPage();if(document.showStatus){document.showStatus();};
">
+ <body onload="divv=document.getElementById('dp') ;dojo.widget.createWidget('ColorPalette',{widgetId:'dp'},divv);Xap.scanPage();if(document.showXapStatus){document.showXapStatus('ColorPicker');};
">
 	<script type="text/javascript">
 		DBG = new AjxDebug( AjxDebug.NONE, null, false ); 
 	</script>

Added: incubator/xap/trunk/WebContent/examples/dojo/dateAndColorPickers.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/dateAndColorPickers.html?rev=430482&view=auto
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/dateAndColorPickers.html (added)
+++ incubator/xap/trunk/WebContent/examples/dojo/dateAndColorPickers.html Thu Aug 10 11:59:59
2006
@@ -0,0 +1,113 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Two xaplets in one page.</title>
+
+	<style type="text/css">
+      <!--
+          @import url(../../css/xapDefault.css);
+      -->
+    </style>
+    
+	<!-- Keep dojo from trying to scan this whole page for dojoType'd tags: -->
+	<script type="text/javascript">
+		djConfig = {
+			parseWidgets: false
+		};
+	</script>    
+	
+    <script language="JavaScript" type="text/javascript" src="../../src/dojo/dojo.js"></script>
+    <script language="JavaScript" type="text/javascript" src="../../src/xap/util/Utils.js"></script>
+    <script language="JavaScript" type="text/javascript" src="../../src/xap/Xap.js"></script>
+    
+
+    <script language="JavaScript" type="text/javascript"> 
+    	// These should be in this order, as this is what their dependencies
+    	// look like   	
+		Xap.addDebuggables( 
+						"xap.session.ClientSession",
+						"xap.taghandling.AbstractTagImpl",
+						"xap.bridges.basic.AbstractBlackBoxWidgetBridge",
+						"xap.bridges.dojo.DojoWidgetBridge",
+						"xap.bridges.dojo.DojoDatePickerBridge",
+						"xap.bridges.dojo.DojoColorPickerBridge",						
+						"xap.session.EventHandler"					
+							) ;
+    </script>
+   
+    <script language="JavaScript" type="text/javascript">
+    	Xap.bootstrap( "../../", true);
+  	</script>
+<!--  Do this as late as possible---brings in script tags: -->
+<script language="JavaScript"> Xap._loadDebuggables();</script>
+
+  	
+  	  <!-- SECTION 2 -->
+	<script type="text/javascript">
+		// Load Dojo's code concerned with a Button or Button2 widget,
+		// including the object dojo.widget needed to create one
+		dojo.require("dojo.widget.*");   
+		dojo.require("dojo.event.*");            
+		dojo.require("dojo.widget.DatePicker");  	   
+		dojo.require("dojo.widget.ColorPalette");  			                                       
+ 	</script>
+
+	<script language="JavaScript" src="xapStatus.js"> </script>
+	<script language="JavaScript" src="datePickerHandler.js"> </script>	
+	<script language="JavaScript" src="colorPickerHandler.js"> </script>		
+
+
+ 
+ 
+ </head>
+  
+ <body onload="Xap.scanPage();if(document.showXapStatus){document.showXapStatus('DatePicker');document.showXapStatus('ColorPicker');};
">
+	<script type="text/javascript">
+		DBG = new AjxDebug( AjxDebug.NONE, null, false ); 
+	</script>
+	<h1>Two Xap-specd applications in one page.</h1>
+	
+	<table id="bigtable" border="5px" borderColor="#88FF88" width="80%" height="80%"
+		style="left:10%;top:10%"
+		cellpadding="20em" cellspacing="2px"
+		>
+		<tr><th width="50%">0.</th><th>1.</th></tr>
+		<tr><td><div  id="dp"/><td/><td></td></tr>
+		<tr><td id="xapStat"></td>		
+			<td><div context="../../"  id="datePickerHome0"
+				appName="DatePicker" src="datePicker.xal" toolkit="dojo">DatePicker's home-base.</div>
+			</td>
+		</tr>
+		<tr><td>This DatePicker was put here via a xap application:based elsewhere.<div
 height="5em" id="targetNode" valign="top" align="left"/></div></td><td><div
id="displ"><b>Pick a day....</b></div></td></tr>
+		<tr><td></td><td height="30px" bgColor="#FFFFee"></td></tr>
+		
+		<tr>
+			<td>	
+				<div context="../../"  id="colorPickerHome"
+						appName="ColorPicker" src="colorPicker.xal" toolkit="dojo">This cell is the xap
ClientSession "ColorPicker"'s home-base.
+				</div>
+			</td>
+			<td>
+				<div id="displayColour">
+						<font size="+2" face="Garamond">Pick a color...
+								<div style="align:center;width:4em">&nbsp;</div>
+								<div style="align:center;width:4em">&nbsp;</div>									
+						</font>
+				</div>			
+			</td>
+</tr>
+		
+		
+	</table>
+
+
+	<!-- DatePicker is the app name is a top-level alias for session
+	as this event handler illustrates -->	
+	<button onclick="alert(DatePicker.getDocumentContainer().getUiDocument().toXml());Xap.getAllDependencies('xap')">hello</button>
+	
+
+	<div id="foot">FOOTER TEXT</dev>
+
+
+</body>
+</html>

Propchange: incubator/xap/trunk/WebContent/examples/dojo/dateAndColorPickers.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/xap/trunk/WebContent/examples/dojo/datePicker.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/datePicker.html?rev=430482&r1=430481&r2=430482&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/datePicker.html (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/datePicker.html Thu Aug 10 11:59:59 2006
@@ -50,7 +50,7 @@
 		dojo.require("dojo.widget.DatePicker");  	                                          
  	</script>
 
-	<script language="JavaScript" src="datePicker.js"> </script>
+	<script language="JavaScript" src="xapStatus.js"> </script>
 	<script language="JavaScript" src="datePickerHandler.js"> </script>	
 
 
@@ -61,7 +61,7 @@
  
  </head>
   
- <body onload="divv=document.getElementById('dp') ;dojo.widget.createWidget('datepicker',{widgetId:'dp'},divv);Xap.scanPage();if(xap.showStatus){xap.showStatus();};
">
+ <body onload="divv=document.getElementById('dp') ;dojo.widget.createWidget('datepicker',{widgetId:'dp'},divv);Xap.scanPage();if(document.showXapStatus){document.showXapStatus('DatePicker');};
">
 	<script type="text/javascript">
 		DBG = new AjxDebug( AjxDebug.NONE, null, false ); 
 	</script>

Modified: incubator/xap/trunk/WebContent/examples/dojo/datePickerHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/datePickerHandler.js?rev=430482&r1=430481&r2=430482&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/datePickerHandler.js (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/datePickerHandler.js Thu Aug 10 11:59:59
2006
@@ -44,8 +44,7 @@
 								+attributes[ii].nodeValue+"</font>" ;				
 		}
 	}
-	xap.showStatus() ;
-	var ticker = document.getElementById("xapStat") ;
+	var ticker = document.showXapStatus("DatePicker") ;
 	ticker.innerHTML = ticker.innerHTML + resultString ;
 	
 }

Modified: incubator/xap/trunk/WebContent/examples/dojo/dojo1.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/dojo1.html?rev=430482&r1=430481&r2=430482&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/dojo1.html (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/dojo1.html Thu Aug 10 11:59:59 2006
@@ -55,7 +55,7 @@
  </head>
  
 
-<body onLoad="Xap.scanPage();if(xap.showStatus){xap.showStatus();}">
+<body onLoad="Xap.scanPage();if(document.showXapStatus){document.showXapStatus('MyApp');}">
 	<script type="text/javascript">
 		DBG = new AjxDebug( AjxDebug.NONE, null, false ); 
 	</script>

Modified: incubator/xap/trunk/WebContent/examples/dojo/dojo1Handler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/dojo1Handler.js?rev=430482&r1=430481&r2=430482&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/dojo1Handler.js (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/dojo1Handler.js Thu Aug 10 11:59:59 2006
@@ -31,7 +31,7 @@
 								+attributes[ii].nodeValue+"</font>" ;				
 		}
 	}
-	xap.showStatus() ;
+	document.showXapStatus("MyApp") ;
 	var ticker = document.getElementById("xapStat") ;
 	ticker.innerHTML = ticker.innerHTML + resultString ;
 	



Mime
View raw message