incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r472753 - in /incubator/xap/trunk: WebContent/examples/widgets/ src/xap/bridges/dojo/ src/xap/taghandling/ src/xap/widgets/dojo/ src/xap/xml/
Date Thu, 09 Nov 2006 03:11:44 GMT
Author: jmargaris
Date: Wed Nov  8 19:11:43 2006
New Revision: 472753

URL: http://svn.apache.org/viewvc?view=rev&rev=472753
Log:
starting to differentiate between tree, table and treeTable

Added:
    incubator/xap/trunk/WebContent/examples/widgets/tree.html   (with props)
    incubator/xap/trunk/WebContent/examples/widgets/tree.xal   (with props)
    incubator/xap/trunk/WebContent/examples/widgets/treeTable.html   (with props)
    incubator/xap/trunk/WebContent/examples/widgets/treeTable.xal   (with props)
    incubator/xap/trunk/src/xap/bridges/dojo/TreeBridge.js   (with props)
    incubator/xap/trunk/src/xap/bridges/dojo/TreeTableBridge.js   (with props)
Modified:
    incubator/xap/trunk/WebContent/examples/widgets/index.html
    incubator/xap/trunk/src/xap/bridges/dojo/TableBridge.js
    incubator/xap/trunk/src/xap/taghandling/plugin.xml
    incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js
    incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js

Modified: incubator/xap/trunk/WebContent/examples/widgets/index.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/index.html?view=diff&rev=472753&r1=472752&r2=472753
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/index.html (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/index.html Wed Nov  8 19:11:43 2006
@@ -18,6 +18,8 @@
 <li><a href="horizontalPanel.html">&lt;horizontalPanel&gt;</a></li>
 <li><a href="borderPanel.html">&lt;borderPanel&gt;</a></li>
 <li><a href="table.html">&lt;table&gt;</a></li>
+<li><a href="tree.html">&lt;tree&gt;</a></li>
+<li><a href="treeTable.html">&lt;treeTable&gt;</a></li>
 <li><a href="menu.html">&lt;menu&gt;</a></li>
 <li><a href="popupMenu.html">&lt;popupMenu&gt;</a></li>
 <li><a href="tooltip.html">&lt;tooltip&gt;</a></li>

Added: incubator/xap/trunk/WebContent/examples/widgets/tree.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/tree.html?view=auto&rev=472753
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/tree.html (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/tree.html Wed Nov  8 19:11:43 2006
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
+		"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+	<head>
+	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	    <title>Simple XAP Widget Example</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="../../xapcore.js"></script>
+	    <script language="JavaScript" type="text/javascript" src="AttributeTester.js"></script>
   
+	    <script language="JavaScript" type="text/javascript" src="TableMco.js"></script>
   
+	</head>
+	  
+	<body onload="Xap.createEmbeddedApplications();">
+		<div startPage="tree.xal"></div>
+	</body>
+</html>
+

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

Added: incubator/xap/trunk/WebContent/examples/widgets/tree.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/tree.xal?view=auto&rev=472753
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/tree.xal (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/tree.xal Wed Nov  8 19:11:43 2006
@@ -0,0 +1,171 @@
+<xal xmlns="http://www.openxal.org/xal" xmlns:xal="http://www.openxal.org/xal"> 
+
+
+	<mco:mco 
+		xmlns:mco="http://www.openxal.org/mco" 
+		id="attributeSetter" 
+		src="AttributeTester"
+	/>
+	
+	<mco:mco 
+		xmlns:mco="http://www.openxal.org/mco" 
+		id="tableMco" 
+		src="TableMco"
+	/>
+	<macro:macro id="addRow" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<cell text="New Cell 1"/><cell text="New Cell 2"/><cell text="New Cell
3"/>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="addColumn" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:insert-after select="id('column3')">
+				<column><header text="Column 4"/></column>
+			</xm:insert-after>
+			<xm:append select="id('row1')">
+				<cell text="New Cell"/>
+			</xm:append>
+				<xm:append select="id('myRow')">
+				<cell text="New Cell"/>
+				</xm:append>
+				<xm:append select="id('row3')">
+				<cell text="New Cell"/>
+				</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="intoBranch" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:append select="id('myBranch')">
+				<row>
+					<cell text="New Cell 1"/><cell text="New Cell 2"/><cell text="New Cell
3"/>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="removeRow" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:remove-element select="id('myBranch')"/>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="removeBranch" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:remove-element select="id('myBranch')"/>
+		</xm:modifications>
+	</macro:macro>
+	
+	
+	
+	<macro:macro id="branch" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<cell text="New Cell 1"/><cell text="New Cell 2"/><cell text="New Cell
3"/>
+					<row>
+						<cell text="depth 3 a"/><cell text="depth 3 b"/><cell text="depth 3
c"/>
+					</row>
+					<row>
+						<cell text="depth 3 a"/><cell text="depth 3 b"/><cell text="depth 3
c"/>
+						<row>
+							<cell text="depth 4 a"/><cell text="depth 4 b"/><cell text="depth 4
c"/>
+						</row>
+						<row>
+							<cell text="depth 4 a"/><cell text="depth 4 b"/><cell text="depth 4
c"/>
+						</row>
+						<row>
+							<cell text="depth 4 a"/><cell text="depth 4 b"/><cell text="depth 4
c"/>
+							<row>
+								<cell text="depth 5 a"/><cell text="depth 5 b"/><cell text="depth
5 c"/>
+								<row>
+									<cell text="depth 6 a"/><cell text="depth 6 b"/><cell text="depth
6 c"/>
+									<row>
+										<cell text="depth 7 a"/><cell text="depth 7 b"/><cell text="depth
7 c"/>
+										<row>
+											<cell text="depth 8 a"/><cell text="depth 8 b"/><cell text="depth
8 c"/>
+										</row>
+									</row>
+								</row>
+							</row>
+						</row>
+						
+					</row>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+
+
+	<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+	<xm:append select="/xal">
+	
+
+	<horizontalPanel>
+
+	<verticalPanel>
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Start table updating" 
+			onCommand="mco:tableMco.startUpdates(testComponent)" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Stop table updating" 
+			onCommand="mco:tableMco.stopUpdates(testComponent)" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Add basic row" 
+			onCommand="macro:addRow.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Add Branches" 
+			onCommand="macro:branch.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Insert Into Branch" 
+			onCommand="macro:intoBranch.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Remove Row" 
+			onCommand="macro:removeRow.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Remove Branch" 
+			onCommand="macro:removeBranch.execute()" />
+
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Add Column" 
+			onCommand="macro:addColumn.execute()" />
+		 
+	
+		 
+</verticalPanel> 
+<verticalPanel>
+		<include href="standardButtons.xal" xmlns="http://www.openxal.org/xinclude"/>
+		 </verticalPanel>
+		<verticalPanel>
+			<tree id="testComponent" width="200px" height="100px" 
+				onActiveGained="mco:attributeSetter.reportEvent(event)" onActiveLost="mco:attributeSetter.reportEvent(event)"
onAfterSort="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onCollapse="mco:attributeSetter.reportEvent(event)" onContextMenu="mco:attributeSetter.reportEvent(event)"
onDoubleClick="mco:attributeSetter.reportEvent(event)" onDragDrop="mco:attributeSetter.reportEvent(event)"
onDragEnd="mco:attributeSetter.reportEvent(event)" onDragStart="mco:attributeSetter.reportEvent(event)"
onEdit="mco:attributeSetter.reportEvent(event)" onExpand="mco:attributeSetter.reportEvent(event)"
onFirstExpand="mco:attributeSetter.reportEvent(event)" onKeyChar="mco:attributeSetter.reportEvent(event)"
onKeyDown="mco:attributeSetter.reportEvent(event)" onKeyUp="mco:attributeSetter.reportEvent(event)"
onMouseDown="mco:attributeSetter.reportEvent(event)" onMouseDrag="mco:attributeSetter.reportEvent(event)"
onMouseMove="mco:attributeSetter.r
 eportEvent(event)" onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"
onMouseUp="mco:attributeSetter.reportEvent(event)" onPositionChange="mco:attributeSetter.reportEvent(event)"
onSelect="mco:attributeSetter.reportEvent(event)" onSort="mco:attributeSetter.reportEvent(event)"
onStateChange="mco:attributeSetter.reportEvent(event)"
+				>
+				<column><header text="Column 1"  onActiveGained="mco:attributeSetter.reportEvent(event)"
onActiveLost="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onCommand="mco:attributeSetter.reportEvent(event)" onContextMenu="mco:attributeSetter.reportEvent(event)"
onDoubleClick="mco:attributeSetter.reportEvent(event)" onDragDrop="mco:attributeSetter.reportEvent(event)"
onDragEnd="mco:attributeSetter.reportEvent(event)" onDragStart="mco:attributeSetter.reportEvent(event)"
onKeyChar="mco:attributeSetter.reportEvent(event)" onKeyDown="mco:attributeSetter.reportEvent(event)"
onKeyUp="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"
onMouseDrag="mco:attributeSetter.reportEvent(event)" onMouseMove="mco:attributeSetter.reportEvent(event)"
onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"/></column>
+				<column><header text="Column 2"/></column>
+				<column id="column3"><header text="Column 3"/></column>
+				<row id="row1"  onDragDrop="mco:attributeSetter.reportEvent(event)" onDragEnd="mco:attributeSetter.reportEvent(event)"
onDragStart="mco:attributeSetter.reportEvent(event)">
+					<cell text="a"  onDoubleClick="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"/><cell
text="b"/><cell text="c"/>
+					<row id="myBranch">
+						<cell text="depth 2 a"/><cell text="depth 2 b"/><cell text="depth 2
c"/>
+						<row>
+							<cell text="depth 3 a"/><cell text="depth 3 b"/><cell text="depth 3
c"/>
+						</row>
+					</row>
+				</row>
+				<row id="myRow">
+					<cell text="a"/><cell text="b"/><cell text="c"/>
+				</row>
+				<row id="row3">
+					<cell text="aaaaaaaaaaaaaaaaaa"/><cell text="bbbbbb"/><cell text="ccccc"/>
+				</row>
+			</tree>
+		</verticalPanel>
+		 </horizontalPanel>
+		
+	</xm:append> 	  		
+  	</xm:modifications>
+</xal>
\ No newline at end of file

Propchange: incubator/xap/trunk/WebContent/examples/widgets/tree.xal
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/xap/trunk/WebContent/examples/widgets/treeTable.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/treeTable.html?view=auto&rev=472753
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/treeTable.html (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/treeTable.html Wed Nov  8 19:11:43 2006
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
+		"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+	<head>
+	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	    <title>Simple XAP Widget Example</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="../../xapcore.js"></script>
+	    <script language="JavaScript" type="text/javascript" src="AttributeTester.js"></script>
   
+	    <script language="JavaScript" type="text/javascript" src="TableMco.js"></script>
   
+	</head>
+	  
+	<body onload="Xap.createEmbeddedApplications();">
+		<div startPage="treeTable.xal"></div>
+	</body>
+</html>
+

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

Added: incubator/xap/trunk/WebContent/examples/widgets/treeTable.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/treeTable.xal?view=auto&rev=472753
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/treeTable.xal (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/treeTable.xal Wed Nov  8 19:11:43 2006
@@ -0,0 +1,171 @@
+<xal xmlns="http://www.openxal.org/xal" xmlns:xal="http://www.openxal.org/xal"> 
+
+
+	<mco:mco 
+		xmlns:mco="http://www.openxal.org/mco" 
+		id="attributeSetter" 
+		src="AttributeTester"
+	/>
+	
+	<mco:mco 
+		xmlns:mco="http://www.openxal.org/mco" 
+		id="tableMco" 
+		src="TableMco"
+	/>
+	<macro:macro id="addRow" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<cell text="New Cell 1"/><cell text="New Cell 2"/><cell text="New Cell
3"/>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="addColumn" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:insert-after select="id('column3')">
+				<column><header text="Column 4"/></column>
+			</xm:insert-after>
+			<xm:append select="id('row1')">
+				<cell text="New Cell"/>
+			</xm:append>
+				<xm:append select="id('myRow')">
+				<cell text="New Cell"/>
+				</xm:append>
+				<xm:append select="id('row3')">
+				<cell text="New Cell"/>
+				</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="intoBranch" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:append select="id('myBranch')">
+				<row>
+					<cell text="New Cell 1"/><cell text="New Cell 2"/><cell text="New Cell
3"/>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="removeRow" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:remove-element select="id('myBranch')"/>
+		</xm:modifications>
+	</macro:macro>
+	
+	<macro:macro id="removeBranch" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:remove-element select="id('myBranch')"/>
+		</xm:modifications>
+	</macro:macro>
+	
+	
+	
+	<macro:macro id="branch" xmlns:macro="http://www.openxal.org/macro">
+		<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<cell text="New Cell 1"/><cell text="New Cell 2"/><cell text="New Cell
3"/>
+					<row>
+						<cell text="depth 3 a"/><cell text="depth 3 b"/><cell text="depth 3
c"/>
+					</row>
+					<row>
+						<cell text="depth 3 a"/><cell text="depth 3 b"/><cell text="depth 3
c"/>
+						<row>
+							<cell text="depth 4 a"/><cell text="depth 4 b"/><cell text="depth 4
c"/>
+						</row>
+						<row>
+							<cell text="depth 4 a"/><cell text="depth 4 b"/><cell text="depth 4
c"/>
+						</row>
+						<row>
+							<cell text="depth 4 a"/><cell text="depth 4 b"/><cell text="depth 4
c"/>
+							<row>
+								<cell text="depth 5 a"/><cell text="depth 5 b"/><cell text="depth
5 c"/>
+								<row>
+									<cell text="depth 6 a"/><cell text="depth 6 b"/><cell text="depth
6 c"/>
+									<row>
+										<cell text="depth 7 a"/><cell text="depth 7 b"/><cell text="depth
7 c"/>
+										<row>
+											<cell text="depth 8 a"/><cell text="depth 8 b"/><cell text="depth
8 c"/>
+										</row>
+									</row>
+								</row>
+							</row>
+						</row>
+						
+					</row>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+	
+
+
+	<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+	<xm:append select="/xal">
+	
+
+	<horizontalPanel>
+
+	<verticalPanel>
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Start table updating" 
+			onCommand="mco:tableMco.startUpdates(testComponent)" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Stop table updating" 
+			onCommand="mco:tableMco.stopUpdates(testComponent)" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Add basic row" 
+			onCommand="macro:addRow.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Add Branches" 
+			onCommand="macro:branch.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Insert Into Branch" 
+			onCommand="macro:intoBranch.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Remove Row" 
+			onCommand="macro:removeRow.execute()" />
+		
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Remove Branch" 
+			onCommand="macro:removeBranch.execute()" />
+
+		<button width="200px" height="50px" alignHorizontal="center" alignVertical="center"
text="Add Column" 
+			onCommand="macro:addColumn.execute()" />
+		 
+	
+		 
+</verticalPanel> 
+<verticalPanel>
+		<include href="standardButtons.xal" xmlns="http://www.openxal.org/xinclude"/>
+		 </verticalPanel>
+		<verticalPanel>
+			<treeTable id="testComponent" width="200px" height="100px" 
+				onActiveGained="mco:attributeSetter.reportEvent(event)" onActiveLost="mco:attributeSetter.reportEvent(event)"
onAfterSort="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onCollapse="mco:attributeSetter.reportEvent(event)" onContextMenu="mco:attributeSetter.reportEvent(event)"
onDoubleClick="mco:attributeSetter.reportEvent(event)" onDragDrop="mco:attributeSetter.reportEvent(event)"
onDragEnd="mco:attributeSetter.reportEvent(event)" onDragStart="mco:attributeSetter.reportEvent(event)"
onEdit="mco:attributeSetter.reportEvent(event)" onExpand="mco:attributeSetter.reportEvent(event)"
onFirstExpand="mco:attributeSetter.reportEvent(event)" onKeyChar="mco:attributeSetter.reportEvent(event)"
onKeyDown="mco:attributeSetter.reportEvent(event)" onKeyUp="mco:attributeSetter.reportEvent(event)"
onMouseDown="mco:attributeSetter.reportEvent(event)" onMouseDrag="mco:attributeSetter.reportEvent(event)"
onMouseMove="mco:attributeSetter.r
 eportEvent(event)" onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"
onMouseUp="mco:attributeSetter.reportEvent(event)" onPositionChange="mco:attributeSetter.reportEvent(event)"
onSelect="mco:attributeSetter.reportEvent(event)" onSort="mco:attributeSetter.reportEvent(event)"
onStateChange="mco:attributeSetter.reportEvent(event)"
+				>
+				<column><header text="Column 1"  onActiveGained="mco:attributeSetter.reportEvent(event)"
onActiveLost="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onCommand="mco:attributeSetter.reportEvent(event)" onContextMenu="mco:attributeSetter.reportEvent(event)"
onDoubleClick="mco:attributeSetter.reportEvent(event)" onDragDrop="mco:attributeSetter.reportEvent(event)"
onDragEnd="mco:attributeSetter.reportEvent(event)" onDragStart="mco:attributeSetter.reportEvent(event)"
onKeyChar="mco:attributeSetter.reportEvent(event)" onKeyDown="mco:attributeSetter.reportEvent(event)"
onKeyUp="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"
onMouseDrag="mco:attributeSetter.reportEvent(event)" onMouseMove="mco:attributeSetter.reportEvent(event)"
onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"/></column>
+				<column><header text="Column 2"/></column>
+				<column id="column3"><header text="Column 3"/></column>
+				<row id="row1"  onDragDrop="mco:attributeSetter.reportEvent(event)" onDragEnd="mco:attributeSetter.reportEvent(event)"
onDragStart="mco:attributeSetter.reportEvent(event)">
+					<cell text="a"  onDoubleClick="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"/><cell
text="b"/><cell text="c"/>
+					<row id="myBranch">
+						<cell text="depth 2 a"/><cell text="depth 2 b"/><cell text="depth 2
c"/>
+						<row>
+							<cell text="depth 3 a"/><cell text="depth 3 b"/><cell text="depth 3
c"/>
+						</row>
+					</row>
+				</row>
+				<row id="myRow">
+					<cell text="a"/><cell text="b"/><cell text="c"/>
+				</row>
+				<row id="row3">
+					<cell text="aaaaaaaaaaaaaaaaaa"/><cell text="bbbbbb"/><cell text="ccccc"/>
+				</row>
+			</treeTable>
+		</verticalPanel>
+		 </horizontalPanel>
+		
+	</xm:append> 	  		
+  	</xm:modifications>
+</xal>
\ No newline at end of file

Propchange: incubator/xap/trunk/WebContent/examples/widgets/treeTable.xal
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/xap/trunk/src/xap/bridges/dojo/TableBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/TableBridge.js?view=diff&rev=472753&r1=472752&r2=472753
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/TableBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/TableBridge.js Wed Nov  8 19:11:43 2006
@@ -47,7 +47,7 @@
 
 
 xap.bridges.dojo.TableBridge.prototype.init = function() {
-	this.superclass.init.call(this);
+	xap.bridges.dojo.DojoWidgetBridge.prototype.init.call(this);
 	//add listener last so we don't fire for the initial set
 	dojo.event.connect(this.getPeer(), "onActivateRow",this,"onActivateRow");	
 	dojo.event.connect(this.getPeer(), "onSelectRow",this,"onSelectRow");	

Added: incubator/xap/trunk/src/xap/bridges/dojo/TreeBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/TreeBridge.js?view=auto&rev=472753
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/TreeBridge.js (added)
+++ incubator/xap/trunk/src/xap/bridges/dojo/TreeBridge.js Wed Nov  8 19:11:43 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright  2006 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+ 
+ /**
+ * @fileoverview
+ * 
+ * A bridge class that controls a dojo Table peer.
+ */
+
+Xap.provide("xap.bridges.dojo.TreeBridge"); 
+
+Xap.require("xap.bridges.dojo.TableBridge");
+Xap.require("xap.widgets.dojo.TreeTable"); 
+
+
+ 
+ /**
+ * @fileoverview
+ * 
+ * A bridge class with dojo toolkit box panel peer.
+ */
+ 
+xap.bridges.dojo.TreeBridge= function() {
+	xap.bridges.dojo.TableBridge.call(this);
+}
+
+
+Xap.setupClassAsSubclassOf(
+				"xap.bridges.dojo.TreeBridge",
+				"xap.bridges.dojo.TableBridge"						
+);
+
+xap.bridges.dojo.TreeBridge.prototype.obtainPeer = function(){
+	xap.bridges.dojo.TableBridge.prototype.obtainPeer.call(this);
+	this.getPeer()._alternateRowClass="treeAlternateRow";
+	this.getPeer()._tableCellClass="treeCell";
+	this.getPeer()._headerVisibility="hidden";
+	//TODO trees should have no header?
+}

Propchange: incubator/xap/trunk/src/xap/bridges/dojo/TreeBridge.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/xap/trunk/src/xap/bridges/dojo/TreeTableBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/TreeTableBridge.js?view=auto&rev=472753
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/TreeTableBridge.js (added)
+++ incubator/xap/trunk/src/xap/bridges/dojo/TreeTableBridge.js Wed Nov  8 19:11:43 2006
@@ -0,0 +1,51 @@
+/*
+ * Copyright  2006 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+ 
+ /**
+ * @fileoverview
+ * 
+ * A bridge class that controls a dojo Table peer.
+ */
+
+Xap.provide("xap.bridges.dojo.TreeTableBridge"); 
+
+Xap.require("xap.bridges.dojo.TableBridge");
+Xap.require("xap.widgets.dojo.TreeTable"); 
+
+
+ 
+ /**
+ * @fileoverview
+ * 
+ * A bridge class with dojo toolkit box panel peer.
+ */
+ 
+xap.bridges.dojo.TreeTableBridge= function() {
+	xap.bridges.dojo.TableBridge.call(this);
+	
+}
+
+Xap.setupClassAsSubclassOf(
+				"xap.bridges.dojo.TreeTableBridge",
+				"xap.bridges.dojo.TableBridge"						
+);
+
+xap.bridges.dojo.TreeTableBridge.prototype.obtainPeer = function(){
+	xap.bridges.dojo.TableBridge.prototype.obtainPeer.call(this);
+	this.getPeer()._alternateRowClass="treeTableAlternateRow";
+	this.getPeer()._tableCellClass="treeTableCell";
+}

Propchange: incubator/xap/trunk/src/xap/bridges/dojo/TreeTableBridge.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/xap/trunk/src/xap/taghandling/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/plugin.xml?view=diff&rev=472753&r1=472752&r2=472753
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/plugin.xml (original)
+++ incubator/xap/trunk/src/xap/taghandling/plugin.xml Wed Nov  8 19:11:43 2006
@@ -72,7 +72,9 @@
 		<mapping class="xap.bridges.dojo.DesktopPaneBridge" name="desktopPane"/>
 		<mapping class="xap.bridges.dojo.DesktopPaneBridge" name="rootPane"/>
 		
-		<mapping class="xap.bridges.dojo.TableBridge" name="table"/>	
+		<mapping class="xap.bridges.dojo.TableBridge" name="table"/>
+		<mapping class="xap.bridges.dojo.TreeTableBridge" name="treeTable"/>	
+		<mapping class="xap.bridges.dojo.TreeBridge" name="tree"/>	
 		<mapping class="xap.bridges.dojo.TabPaneBridge" name="tabPane"/>	
 		<mapping class="xap.bridges.dojo.TabBridge" name="tab"/>	
 		<mapping class="xap.bridges.dojo.FreePanelBridge" name="freePanel"/>	

Modified: incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js?view=diff&rev=472753&r1=472752&r2=472753
==============================================================================
--- incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js (original)
+++ incubator/xap/trunk/src/xap/widgets/dojo/TreeTable.js Wed Nov  8 19:11:43 2006
@@ -51,6 +51,9 @@
 		
 	dojo.widget.HtmlWidget.call(this);
 	this._rebuildTableLater();
+	this._alternateRowClass = "alternateRow"
+	this._tableCellClass = "tableCell"
+	this._headerVisibility = "visible";
 }
 
 dojo.inherits(xap.widgets.dojo.TreeTable,dojo.widget.HtmlWidget);
@@ -256,6 +259,8 @@
 	 * of the table.
 	 */
 	_rebuildHead: function(){
+		
+		var headerVisibility = this.headerDiv.style.visibility;
 		this.domNode.removeChild(this.headerDiv);
 		
 		this.headerDiv = document.createElement("div");
@@ -291,6 +296,13 @@
 			if (this._columns[i]._header){	
 				cell.appendChild(this._columns[i]._header);
 			}
+			cell.style.visibility = this._headerVisibility;
+		}
+		
+		if (this._headerVisibility=='hidden'){
+			this.domNode.style.padding="0px 0px 0px 0px";
+			this.headerDiv.style.visibility='hidden';
+			this.headerDiv.style.display='none';
 		}
 	},
 	
@@ -312,11 +324,14 @@
 		//IMPORTANT this is not going to be right for nested rows that 
 		//aren't visible, if someone expands/contracts we need to 
 		//re-assign the alternateRow status
-		if (alternateRow){
-			dojo.html.addClass(row.domNode,"alternateRow");
-		}
-		else{
-			dojo.html.removeClass(row.domNode,"alternateRow");
+		
+		if (this._alternateRowClass){
+			if (alternateRow){
+				dojo.html.addClass(row.domNode,this._alternateRowClass);
+			}
+			else{
+				dojo.html.removeClass(row.domNode,this._alternateRowClass);
+			}
 		}
 		alternateRow = !alternateRow;
 		for (var i = 0; i<row._rows.length; i++){
@@ -573,7 +588,10 @@
 		var td = document.createElement("td");
 		this.domNode.appendChild(td);
 		td.style.whiteSpace = "nowrap";
-		dojo.html.addClass(td,"tableCell");
+		
+		if (this._table && this._table._tableCellClass){
+			dojo.html.addClass(td,this._table._tableCellClass);
+		}
 		
 		//TODO should we use style.textAlign instead of this
 		//everywhere???

Modified: incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js?view=diff&rev=472753&r1=472752&r2=472753
==============================================================================
--- incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js Wed Nov  8 19:11:43 2006
@@ -73,12 +73,29 @@
  * @throws UpdateException
  */
 xap.xml.XalNamespaceHandler.prototype.receiveDispatch = function( element ) {
-	xap.xml.XalNamespaceHandler.s_log.debug("receiveDispatch:" + element);
-	 
 	 //get the root and just append to it
 	 var uiDocument = this._session.getDocumentContainer().getUiDocument();
 	 var rootElement = uiDocument.getRootElement();
-	 rootElement.appendChild(element);
+	 var rootPane = null;
+	 
+	 for (var i = 0; i<rootElement.childNodes.length &&!rootPane; i++){
+	 	var child = rootElement.childNodes[i];
+	 	if (child.nodeType==google.DOM_ELEMENT && child.nodeName=="rootPane"){
+	 		alert("found an existing root pane");
+	 		rootPane = child;
+	 	}
+	 }
+	 
+	 if (!rootPane){
+	 	alert("Could not find a root pane creating a new one");	 	
+	 	
+	 	//TODO should we take this namespace from the element passed in instead?
+	    rootPane = uiDocument.createElement("rootPane",null,element.getNamespaceUri());
+	    rootPane.setAttribute("width","100%");
+	    rootPane.setAttribute("height","100%");
+	    rootElement.appendChild(rootPane);
+	 }
+	 rootPane.appendChild(element);
 }
 
 



Mime
View raw message