You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by sb...@apache.org on 2007/01/26 18:22:21 UTC

svn commit: r500296 [4/5] - in /incubator/xap/trunk/samples/WebContent/examples: ./ basic/ dataBinding/ demo/ demo/images/ dojo/ helloWorld/ html-xmodify/ urlResolution/ urlResolution/images/ urlResolution/xmodify/ widgets/ widgets/images/ widgets/incl...

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/menu.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/menu.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/menu.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/menu.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,420 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+				id="testComponentFreePane">
+				<xal:menuBar id="testComponent">
+					<xal:menu text="Edit" id="testMenuBarItem"
+						onCreate="mco:attributeSetter.registerElement(this)">
+						<xal:popupMenu>
+							<xal:menuItem text="Cut"/>
+							<xal:menuItem text="Copy"/>
+							<xal:horizontalSeparator width="10px"/>
+							<xal:menuItem text="Paste"/>
+						</xal:popupMenu>
+					</xal:menu>
+
+					<xal:menu text="File">
+						<xal:popupMenu>
+							<xal:menuItem text="Open" enabled="false"
+								onCommand="mco:attributeSetter.reportEvent(event)"/>
+							<xal:menuItem text="Close"
+								onCommand="mco:attributeSetter.reportEvent(event)"/>
+							<xal:menuItem text="Preferences.">
+								<xal:popupMenu>
+									<xal:menuItem text="A preference"/>
+									<xal:menuItem text="A different preference"/>
+								</xal:popupMenu>
+							</xal:menuItem>
+						</xal:popupMenu>
+					</xal:menu>
+
+					<xal:menu text="Format" enabled="false">
+						<xal:popupMenu>
+							<xal:menuItem text="Cut"/>
+							<xal:menuItem text="Copy"/>
+							<xal:menuItem text="Paste"/>
+						</xal:popupMenu>
+					</xal:menu>
+
+					<xal:menu text="Run">
+						<xal:popupMenu>
+							<xal:menuItem text="Open" id="testMenuItem"
+								onCreate="mco:attributeSetter.registerElement(this)"/>
+							<xal:menuItem text="Close"/>
+							<xal:menuItem text="Preferences..."/>
+						</xal:popupMenu>
+					</xal:menu>
+
+				</xal:menuBar>
+
+			</freePane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label width="500px" height="25px" text="Menu Bar test"
+								fontWeight="bold"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="enabled:"/>
+								<radioButton group="enabled" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(testComponent, this.group ,this.text)"
+									onCreate="mco:SmokeTests.addAttributeTest(this.group, this.text, this)"/>
+								<radioButton group="enabled" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(testComponent, this.group ,this.text)"
+									onCreate="mco:SmokeTests.addAttributeTest(this.group, this.text, this)"/>
+								<radioButton group="enabled" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testComponent, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="pack:"/>
+								<radioButton group="pack" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(testComponent, this.group ,this.text)"
+									onCreate="mco:SmokeTests.addAttributeTest(this.group, this.text, this)"/>
+								<radioButton group="pack" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(testComponent, this.group ,this.text)"
+									onCreate="mco:SmokeTests.addAttributeTest(this.group, this.text, this)"/>
+								<radioButton group="pack" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testComponent, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<label height="25px" text="Menu Bar >> Edit tests:" fontWeight="bold"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="borderWidth:"/>
+								<radioButton group="borderWidth" width="75px" text="1px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group ,this.text)"/>
+								<radioButton group="borderWidth" width="75px" text="3px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group ,this.text)"/>
+								<radioButton group="borderWidth" width="75px" text="25px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group ,this.text)"/>
+								<radioButton group="borderWidth" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="borderStyle:"/>
+								<radioButton group="borderStyle" width="75px" text="solid"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group ,this.text)"/>
+								<radioButton group="borderStyle" width="75px" text="dotted"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group ,this.text)"/>
+								<radioButton group="borderStyle" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="borderColor:"/>
+								<radioButton group="borderColor" width="75px" text="red"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="borderColor" width="75px" text="#33CCCC"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="borderColor" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="backgroundColor:"/>
+								<radioButton group="backgroundColor" width="75px" text="green"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="backgroundColor" width="75px" text="#FF00CC"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="backgroundColor" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="width:"/>
+								<radioButton group="width" width="75px" text="100px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="300px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="25%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text=""/>
+								<radioButton group="width" width="75px" text="50%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="100%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="height:"/>
+								<radioButton group="height" width="75px" text="100px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="300px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="25%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text=""/>
+								<radioButton group="height" width="75px" text="50%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="100%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontWeight:"/>
+								<radioButton group="fontWeight" width="75px" text="bold"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontWeight" width="75px" text="lighter"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontWeight" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontFamily:"/>
+								<radioButton group="fontFamily" width="75px" text="Arial"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontFamily" width="75px" text="serif"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontFamily" width="75px" text="sans-serif"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontFamily" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontStyle:"/>
+								<radioButton group="fontStyle" width="75px" text="normal"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontStyle" width="75px" text="italic"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontStyle" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="(font) color:"/>
+								<radioButton group="color" width="75px" text="#339966"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="color" width="75px" text="blue"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="color" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontSize:"/>
+								<radioButton group="fontSize" width="75px" text="8px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontSize" width="75px" text="12px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontSize" width="75px" text="24px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="fontSize" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="visible:"/>
+								<radioButton group="visible" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="visible" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(testMenuBarItem, this.group, this.text)"/>
+								<radioButton group="visible" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuBarItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<label height="25px" text="MenuItem Run > Open" fontWeight="bold"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="borderWidth:"/>
+								<radioButton group="borderWidth" width="75px" text="1px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group ,this.text)"/>
+								<radioButton group="borderWidth" width="75px" text="5px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group ,this.text)"/>
+								<radioButton group="borderWidth" width="75px" text="25px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group ,this.text)"/>
+								<radioButton group="borderWidth" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="borderStyle:"/>
+								<radioButton group="borderStyle" width="75px" text="solid"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group ,this.text)"/>
+								<radioButton group="borderStyle" width="75px" text="dotted"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group ,this.text)"/>
+								<radioButton group="borderStyle" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="borderColor:"/>
+								<radioButton group="borderColor" width="75px" text="red"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="borderColor" width="75px" text="#33CCCC"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="borderColor" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="backgroundColor:"/>
+								<radioButton group="backgroundColor" width="75px" text="green"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="backgroundColor" width="75px" text="#FF00CC"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="backgroundColor" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="width:"/>
+								<radioButton group="width" width="75px" text="100px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="300px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="25%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text=""/>
+								<radioButton group="width" width="75px" text="50%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="100%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="width" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="height:"/>
+								<radioButton group="height" width="75px" text="100px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="300px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="25%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text=""/>
+								<radioButton group="height" width="75px" text="50%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="100%"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="height" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontWeight:"/>
+								<radioButton group="fontWeight" width="75px" text="bold"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontWeight" width="75px" text="lighter"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontWeight" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontFamily:"/>
+								<radioButton group="fontFamily" width="75px" text="Arial"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontFamily" width="75px" text="serif"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontFamily" width="75px" text="sans-serif"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontFamily" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontStyle:"/>
+								<radioButton group="fontStyle" width="75px" text="normal"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontStyle" width="75px" text="italic"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontStyle" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="(font) color:"/>
+								<radioButton group="color" width="75px" text="#339966"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="color" width="75px" text="blue"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="color" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="fontSize:"/>
+								<radioButton group="fontSize" width="75px" text="8px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontSize" width="75px" text="12px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontSize" width="75px" text="24px"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="fontSize" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="visible:"/>
+								<radioButton group="visible" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="visible" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="visible" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="hidden:"/>
+								<radioButton group="hidden" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="hidden" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(testMenuItem, this.group, this.text)"/>
+								<radioButton group="hidden" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testMenuItem, this.group)"
+								/>
+							</horizontalBoxPane>
+							<label text=" " height="25px"/>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/passwordField.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/passwordField.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/passwordField.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/passwordField.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,47 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+				id="testComponentFreePane">
+				<xal:passwordField id="testComponent"/>
+			</freePane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<include href="includes/textAttributeTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<label text=" " height="25px"/>
+							<include href="includes/formElementTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<!-- textField specific properties -->
+							<label text=" " height="25px"/>
+							<include href="includes/editableFieldTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/popupMenu.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/popupMenu.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/popupMenu.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/popupMenu.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,71 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<horizontalBoxPane>
+				<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+					id="testComponentFreePane">
+					<xal:defs>
+						<xal:popupMenu id="testComponent">
+							<xal:menuItem text="Cut" id="cut"
+								onCommand="mco:attributeSetter.reportEvent(event)"
+								onCreate="mco:attributeSetter.registerElement(this)"/>
+							<xal:menuItem text="Copy"/>
+							<xal:horizontalSeparator/>
+							<xal:menuItem text="Paste">
+								<xal:popupMenu>
+									<xal:menuItem text="Cut"/>
+									<xal:menuItem text="Copy"/>
+									<xal:horizontalSeparator/>
+									<xal:menuItem text="Paste"/>
+								</xal:popupMenu>
+							</xal:menuItem>
+						</xal:popupMenu>
+					</xal:defs>
+
+					<xal:defs>
+						<xal:popupMenu id="testComponent2"
+							onCreate="mco:attributeSetter.registerElement(this)"> </xal:popupMenu>
+					</xal:defs>
+
+					<xal:button text="I have a popup" popup="#testComponent"/>
+
+					<xal:label x="0px" y="40px" text="I have the same popup" popup="#testComponent"/>
+
+					<xal:checkBox x="0px" y="80px" text="I have a different, empty one"
+						popup="#testComponent2"/>
+
+
+				</freePane>
+			</horizontalBoxPane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<label text="None right now"/>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/radioButton.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/radioButton.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/radioButton.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/radioButton.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,112 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<horizontalBoxPane>
+				<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+					id="testComponentFreePane">
+					<radioButton text="testComponent" id="testComponent" group="tc"/>
+
+				</freePane>
+				<freePane width="500px" height="300px" backgroundColor="#CCCCCC"
+					id="testComponentFreePane2">
+					<radioButton id="radio1" x="0px" y="0px" width="150px" height="20px"
+						text="RADIO 1" group="America"
+						onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)"
+						onCreate="mco:attributeSetter.registerElement(this)"/>
+					<radioButton id="radio2" x="150px" y="0px" width="150px" height="20px"
+						text="RADIO 2" group="America"
+						onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)"
+						onCreate="mco:attributeSetter.registerElement(this)"/>
+					<radioButton x="300px" y="0px" width="150px" height="20px" text="RADIO 3"
+						group="America" onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)" selected="true"/>
+
+					<radioButton x="0px" y="40px" width="150px" height="30px" text="RADIO 4 group 2"
+						group="group2" onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)" selected="true"/>
+					<radioButton x="150px" y="40px" width="150px" height="30px"
+						text="RADIO 5 group 2" group="group2"
+						onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)"/>
+
+					<radioButton x="0px" y="80px" width="200px" height="50px"
+						text="RADIO 6 no group"
+						onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)"/>
+					<radioButton x="150px" y="80px" width="200px" height="50px"
+						text="RADIO 7 no group"
+						onStateChange="mco:attributeSetter.reportEvent(event)"
+						onSelect="mco:attributeSetter.reportEvent(event)"/>
+				</freePane>
+			</horizontalBoxPane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="50%">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<include href="includes/textAttributeTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<label text=" " height="25px"/>
+							<include href="includes/imageAttributeTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<include href="includes/toggledFormElementTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<include href="includes/formElementTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<label text=" " height="50px"/>
+
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<button text="Autowrapped Long text with image"
+								onCommand="mco:SmokeTests.buttonLongTextWithImage(testComponent, smokeTestCompareButton)"/>
+							<label text="The text should all be to the left of the image."/>
+							<button text="Changer"
+								onCommand="mco:SmokeTests.buttonImageResizing(testComponent, smokeTestCompareButton)"/>
+							<label autoWrap="true" width="500px"
+								text="Changes the label around. It should always return to its original state and resemble the bottom button in the end. Things changed: image size, border size, text alignment, image alignment, font size"/>
+							<button text="Select/Deselect test"
+								onCommand="mco:SmokeTests.radioSelectDeselect(radio1, radio2)"/>
+							<label autoWrap="true" width="500px"
+								text="Deselects 'RADIO 1' and selects 'RADIO 2', then deselects 'RADIO 2'. Make sure that both buttons are reselectable, and test this with each one initially checked and unchecked. RADIO 2 tends to fail this test."
+							/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text=" " fontWeight="bold"/>
+							<button text="TextPlacement"
+								onCommand="mco:SmokeTests.textPlacement(testComponent, smokeTestCompareButton)"/>
+							<label autoWrap="true" width="500px"
+								text="Sets horizontalTextToImagePlacement to left, verticalTextToImagePlacement to bottom, so the text should be to the bottom left of the image"/>
+							<button text="images"
+								onCommand="mco:SmokeTests.images(testComponent, smokeTestCompareButton)"/>
+							<label autoWrap="true" width="500px"
+								text="Sets images for the label for background, foreground"/>
+							<button width="200px" height="25px"
+								text="Print Dark Grey Right-Hand Frame XAL"
+								onCommand="mco:attributeSetter.printElement(testComponentFreePane2)"
+							/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/row.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/row.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/row.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/row.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,223 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+	<mco:mco xmlns:mco="http://openxal.org/core/mco" id="tableMco" class="TableMco"
+		src="src-js/TableMco.js"/>
+	<macro:macro id="addRow" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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="addMultiRow" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<cell text="New Cell 1"/>
+					<cell text="New Cell 2"/>
+					<cell text="New Cell 3"/>
+				</row>
+				<row>
+					<cell text="New Cell 4"/>
+					<cell text="New Cell 5"/>
+					<cell text="New Cell 6"/>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="intoBranch" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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="removeAllRows" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="//row"/>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="removeBranch" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="id('myBranch')"/>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="removeAllBranches" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="//row/row"/>
+		</xm:modifications>
+	</macro:macro>
+
+
+	<macro:macro id="branch" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<horizontalBoxPane>
+				<freePane width="500px" height="300px" backgroundColor="#EEEEFF"
+					id="testComponentFreePane">
+					<table>
+						<column id="column1">
+							<header text="Column 1"/>
+						</column>
+						<column>
+							<header text="Column 2"/>
+						</column>
+						<column id="column3">
+							<header text="Column 3"/>
+						</column>
+						<row id="row1">
+							<cell text="a"/>
+							<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="testComponent">
+							<cell text="testComponent"/>
+							<cell text="y"/>
+							<cell text="z"/>
+						</row>
+						<row id="row3">
+							<cell text="aaaaaaaaaaaaaaaaaa"/>
+							<cell text="bbbbbb"/>
+							<cell text="ccccc"/>
+						</row>
+					</table>
+				</freePane>
+			</horizontalBoxPane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="selected:"/>
+								<radioButton group="selected" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(testComponent, this.group ,this.text)"
+									onCreate="mco:SmokeTests.addAttributeTest(this.group, this.text, this)"/>
+								<radioButton group="selected" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(testComponent, this.group ,this.text)"
+									onCreate="mco:SmokeTests.addAttributeTest(this.group, this.text, this)"/>
+								<radioButton group="selected" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(testComponent, this.group)"
+								/>
+							</horizontalBoxPane>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<include href="includes/tableSmokeTests0.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<button width="200px" height="25px" horizontalAlign="center"
+								verticalAlign="center" text="Add Widget Cells"
+								onCommand="macro:addWidgetCells.execute()"/>
+							<label width="500px" autoWrap="true"
+								text="Cells can be replaced by various widgets. This will put those widgets into 3 rows"/>
+
+						</verticalBoxPane>
+						<verticalBoxPane>
+						<include href="includes/tableSmokeTests1.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+						<include href="includes/attributeAutoTest.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/scrollPane.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/scrollPane.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/scrollPane.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/scrollPane.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,58 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<horizontalBoxPane>
+				<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+					id="testComponentFreePane">
+					<xal:scrollPane id="testComponent" width="300px" height="200px">
+						<xal:verticalBoxPane>
+							<xal:button text="button1"/>
+							<xal:button text="button2"/>
+							<xal:button text="button3"/>
+							<xal:button text="buttonA"/>
+							<xal:button text="buttonB"/>
+							<xal:button text="buttonC"/>
+							<xal:button text="button1"/>
+							<xal:button text="button2"/>
+							<xal:button text="button3"/>
+							<xal:button text="buttonA"/>
+							<xal:button text="buttonB"/>
+							<xal:button text="buttonC"/>
+						</xal:verticalBoxPane>
+					</xal:scrollPane>
+				</freePane>
+			</horizontalBoxPane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label fontStyle="italic" autoWrap="true"
+								text="Note: Due to a bug, the height for this component has been pre-set in this component test. It can be changed without a problem, but its current displayed height is not its default"/>
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<label text="None right now"/>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/AttributeTester.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/AttributeTester.js?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/AttributeTester.js (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/AttributeTester.js Fri Jan 26 10:22:14 2007
@@ -0,0 +1,316 @@
+AttributeTester = function(){
+	AttributeTesterObj = this;
+	this._registeredElements = [];
+}
+
+// Used in checking MCO resolution:
+AttributeTesterAlias = AttributeTester;
+
+
+var AttributeTesterObj;
+
+
+//Makes the scrollpane take up the remainder of the screen
+//Some issues with IE and FF differences
+AttributeTester.prototype.resizeScrollPane = function(scrollPane, tcfp){
+	var tcHeight = tcfp.getAttribute("height");
+	if(window.innerHeight){
+		scrollPane.setAttribute("height", (window.innerHeight - parseInt(tcHeight.replace("px",""))) + "px");
+	}
+	else if(document.documentElement.clientHeight){
+		scrollPane.setAttribute("height", (document.documentElement.clientHeight - parseInt(tcHeight.replace("px",""))) + "px");
+	}
+	else scrollPane.setAttribute("height", "500px");
+}
+	
+	
+AttributeTester.prototype.registerElement = function(element){
+	this._registeredElements.push(element.getAttribute('id'));
+}
+
+AttributeTester.prototype.printRegisteredElements = function(parentListBox){
+	this._mainDocument = parentListBox.ownerDocument;
+	for(var i = 0; i < this._registeredElements.length; i++){
+		newElement = parentListBox.ownerDocument.createElement("listItem","http://openxal.org/ui");
+		newElement.setAttribute("text",this._registeredElements[i]);
+		newElement.setAttribute("value",this._registeredElements[i]);
+		parentListBox.appendChild(newElement);
+	}
+
+
+}
+	
+
+AttributeTester.prototype.setAttribute = function(element, name, value){
+	if( name && name.length>0 ){
+		element.setAttribute(name, value);
+		this._lastElement = element ;
+	} else {
+		eval(value) ;
+	}
+}
+
+
+//Base element used for getting owner document
+AttributeTester.prototype.setAttributeById = function(id, name, value){
+	var element = this._mainDocument.getElementById(id);
+	this.setAttribute(element, name, value);
+}
+
+AttributeTester.prototype.removeAttribute = function(element, name){
+	if( name && name.length>0 ){
+		element.removeAttribute(name);
+		this._lastElement = element ;
+	}
+}
+
+// Hit 'return' in the "value" field, set the attribute:
+AttributeTester.prototype.setAttributeOnCR = function(event,element, name, value){
+	if(event.keyChar=='\r'){
+		this.setAttribute(element,name,value) ;
+	}
+}
+
+AttributeTester.prototype.evalCodeOnCR = function(event,code){
+	if(event.keyChar=='\r'){
+		this.evalCode(code) ;
+	}
+}
+
+AttributeTester.prototype.evalCode = function(code){
+	eval(code);
+}
+
+
+
+
+AttributeTester.prototype.getAttribute = function(element, name){
+	return element.getAttribute(name);
+}
+
+AttributeTester.prototype.getAttributeCaption = function(element, name){
+	return "Name: '"+name+"', value: "+element.getAttribute(name)+".";
+}
+
+AttributeTester.prototype.reportTextValueAttributes = function(element){
+	this.reportAttributes(element, ["text", "value"] ) ;
+}
+
+AttributeTester.prototype.reportAttributes = function(element, names){
+	var arr = names ;
+	if(typeof names == "string"){
+		arr = [ names] ;
+	}
+	var attributeValuesString = "Attribute-->value\n";
+	for ( var ii=0; ii<arr.length; ++ii ){
+		attributeValuesString +=   ". . .  "+arr[ii]+"-->"
+									+element.getAttribute(arr[ii])+"\n";
+	}
+	alert(attributeValuesString) ;
+}
+
+
+
+AttributeTester.prototype.toggleBooleanAttribute = function(element, name){
+	var val = element.getAttribute(name) ;
+	var newVal = (val=="true")?"false":"true" ;
+	element.setAttribute(name, newVal );
+}
+
+
+AttributeTester.prototype.reportEvent = function(event){
+	this.log(event.toString());
+}
+
+//pp is PrettyPrint. True will format the text as indented, fixed-width XML. False just outputs the text
+AttributeTester.prototype.log = function(text, pp){
+	if (!this._logDiv){
+		var l = document.createElement('div');
+		l.style.position = 'absolute';
+	    l.style.right = '5px';
+	    l.style.top = '5px';
+	    l.style.width = '200px';
+	    l.style.height = '350px';
+	    l.style.overflow = 'auto';
+	    l.style.backgroundColor = '#f0f0f0';
+	    l.style.border = '1px solid gray';
+	    l.style.fontSize = '10px';
+	    l.style.padding = '5px';
+	    document.body.appendChild(l);   
+	    this._logDiv = l;
+		dojo.event.connect(this._logDiv, "ondblclick",this,"clearLog");		  	    
+	}
+	if(this._logDiv.innerHTML == "") this._logDiv.innerHTML="[Double-click to clear.]<br/><br/><A HREF=\"javascript:AttributeTesterObj.resizeOutput(true)\">Bigger</A> | <A HREF=\"javascript:AttributeTesterObj.resizeOutput(false)\">Smaller</A>";        
+	
+	//dojo.event.connect(this.body, "ondblclick",this,"transportWidget");	
+
+	text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
+	text = text.replace(/\n/g,'<br>');
+	if(pp == null || !pp){
+		this._logDiv.innerHTML = this._logDiv.innerHTML.replace(/<[\/]*b>/g,"") +
+			 "<br/><br/><b>" + text+"</b>";
+	}
+	else{
+	 	this._logDiv.innerHTML = this._logDiv.innerHTML.replace(/<[\/]*b>/g,"") + "<br/><br/><b><pre>" + this.prettyPrint(text)+"</pre></b>";
+	}
+	this._logDiv.scrollTop = this._logDiv.scrollHeight;
+	this._logDiv.style.display = "block";
+	
+}
+
+AttributeTester.prototype.resizeOutput = function(bigger){
+	if(bigger){
+		this._logDiv.style.width = (parseInt(this._logDiv.style.width) + 100) + "px";
+		this._logDiv.style.height = (parseInt(this._logDiv.style.height) + 100) + "px";
+	}
+	else{
+		this._logDiv.style.width = Math.max(parseInt(this._logDiv.style.width) - 100, 150) + "px";
+		this._logDiv.style.height = Math.max(parseInt(this._logDiv.style.height) - 100, 100) + "px";
+	}
+}
+
+
+AttributeTester.prototype.clearLog = function(){
+
+	if (this._logDiv){
+		this._logDiv.style.display = "none";
+		this._logDiv.innerHTML = "" ;	
+	}
+}
+
+
+//IMPORTANT this works if you remove the same thing twice,
+//no error. Because we still found element in hashtable?
+AttributeTester.prototype.insertBefore = function( element ){
+alert("insert before");
+	var newElement = element.ownerDocument.createElement("freePane","http://openxal.org/ui");
+	newElement.setAttribute("backgroundColor","yellow");
+	newElement.setAttribute("width","30px");
+	newElement.setAttribute("height","30px");
+	element.parentNode.insertBefore(newElement,element);
+	alert("New dom node = " + element.parentNode.toXml());
+}
+
+AttributeTester.prototype.remove = function( element ){
+	alert("remove " + element);
+	element.parentNode.removeChild(element);
+	alert("New dom node = " + element.parentNode.toXml());
+}
+
+AttributeTester.prototype.printElementById = function(id){
+	var element = this._mainDocument.getElementById(id);
+	this.printElement(element);
+}
+
+AttributeTester.prototype.printElement = function( element ){
+	//this.log(element.toXml());
+	this.log(element.toXml(), true);
+	
+}
+
+
+// I was having some weird issues before that meant indexOf wasn't working, so sorry for the bastardized code.
+AttributeTester.prototype.prettyPrint = function(str){
+	var indentCount = 0;
+	for(var i = 0; i < str.length; i++){
+		//unindent on </
+		if(str.substring(i, i+5) == "&lt;/"){
+			indentCount--;
+			str = str.substring(0, i) + "\n" + this.spaceString(indentCount*2) + str.substring(i);
+			i += 3 + (indentCount*2);
+		}
+		//indent on <
+		else if(str.substring(i, i+4) == "&lt;"){
+			str = str.substring(0, i) + "\n" + this.spaceString(indentCount*2) + str.substring(i);
+			i += 3 + (indentCount*2);
+			indentCount++;
+		}
+		//unindent on />
+		else if(str.substring(i, i+5) == "/&gt;"){
+			i += 1;
+			indentCount--;
+		}
+	
+	}
+	return str;
+}
+
+AttributeTester.prototype.spaceString = function(size){
+	var str = "";
+	for(i = 0; i < size; i++){
+		str += " ";
+	}
+	return str;
+}
+		
+
+AttributeTester.prototype.addBorderComponent = function( parent, borderPosition ){
+alert("add border component");
+	var newElement = parent.ownerDocument.createElement("freePane","http://openxal.org/ui");
+	newElement.setAttribute("backgroundColor","yellow");
+	newElement.setAttribute("borderPosition", borderPosition);
+	newElement.setAttribute("width","30px");
+	newElement.setAttribute("height","30px");
+	newElement.setAttribute("id", borderPosition);
+	parent.appendChild(newElement);
+	alert("New dom node = " + parent.toXml());
+}
+
+
+AttributeTester.newOptionItemCount=-1;
+AttributeTester.prototype.appendListItem = function(element,selectedP) {
+	alert("append");
+	var newElement = element.ownerDocument.createElement("listItem",  "http://openxal.org/ui");
+	var caption="originally " ;
+	caption += ((selectedP)?"selected.":"not selected.") ;
+	newElement.setAttribute("text", ""+(++AttributeTester.newOptionItemCount)+": new text, " + caption);
+	newElement.setAttribute("value",""+(AttributeTester.newOptionItemCount)+": new value, " + caption);
+	newElement.setAttribute("selected", ""+selectedP);
+	element.appendChild(newElement);
+	alert("New dom node:\n" + newElement.toXml());
+}
+
+
+AttributeTester.prototype.addEventsById = function(id){
+	var element = this._mainDocument.getElementById(id);
+	this.addEvents(element);
+}
+
+AttributeTester.prototype.addEvents = function(element){
+	element.setAttribute("onActiveGained","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onActiveLost","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onAfterSort","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onBeforeActiveLost","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onClose","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onClosing","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onCollapse","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onCommand","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onContextMenu","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onDoubleClick","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onDragDrop","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onDragEnd","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onDragStart","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onEdit","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onExpand","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onFirstExpand","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onKeyChar","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onKeyDown","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onKeyUp","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMaximize","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMaximizing","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMinimize","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMinimizing","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMouseDown","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMouseDrag","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMouseMove","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMouseOut","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMouseOver","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onMouseUp","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onPositionChange","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onRestore","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onRestoring","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onSelect","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onSort","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onStateChange","mco:attributeSetter.reportEvent(event)");
+	element.setAttribute("onTextChange","mco:attributeSetter.reportEvent(event)"); 
+}

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/CyclingMco.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/CyclingMco.js?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/CyclingMco.js (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/CyclingMco.js Fri Jan 26 10:22:14 2007
@@ -0,0 +1,75 @@
+CyclingMco = function(){
+	
+};
+
+
+CyclingMco.prototype.startCycling = function( tableElement ){
+	window.tableElement = tableElement;
+	window.cycling = true;
+	window.intervalId = window.setTimeout('replaceRows()',50);
+	window.rowCount = 0;
+
+}
+
+CyclingMco.prototype.cycleOnce = function( tableElement ){
+	window.tableElement = tableElement;
+	window.cycling = false;
+	replaceRows();
+
+}
+
+CyclingMco.prototype.clear= function( tableElement ){
+	for (var i = 0; i<tableElement.childNodes.length; i++){
+		var child = tableElement.childNodes[i];
+		if (child.nodeName=='row'){
+			tableElement.removeChild(child);
+			i--
+		}
+	}	
+}
+
+CyclingMco.prototype.printStats= function( event ){
+	var docHandler = event.session.getUiDocumentHandler();
+	alert("Elements->bridges: " + docHandler._elementsToBridges);
+	alert("Peers->bridges: " + docHandler._peersToBridges);
+}
+
+CyclingMco.prototype.stopCycling= function( ){
+	window.cycling = false;
+}
+
+replaceRows = function(){
+	var tableElement = window.tableElement;
+	for (var i = 0; i<tableElement.childNodes.length; i++){
+		var child = tableElement.childNodes[i];
+		if (child.nodeName=='row'){
+			tableElement.removeChild(child);
+			i--
+		}
+	}	
+	
+	
+	var ownerDocument = new xap.xml.dom.Document();
+	window.rowCount++;
+	
+	for (var i =0; i<50; i++){
+		var newRow = ownerDocument.createElement("row", "http://openxal.org/ui");
+		var newCell = ownerDocument.createElement("cell", "http://openxal.org/ui");
+		newCell.setAttribute("text","cell:" + window.rowCount);
+		newRow.appendChild(newCell);
+		
+		newCell = ownerDocument.createElement("cell", "http://openxal.org/ui");
+		newCell.setAttribute("text","cell:" + window.rowCount);
+		newRow.appendChild(newCell);
+		
+		newCell = ownerDocument.createElement("cell", "http://openxal.org/ui");
+		newCell.setAttribute("text","cell:" + window.rowCount);
+		newRow.appendChild(newCell);
+		
+		tableElement.appendChild(newRow);
+	}
+
+	if (window.cycling){
+		window.intervalId = window.setTimeout('replaceRows()',1);
+	}
+}
\ No newline at end of file

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/SmokeTests.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/SmokeTests.js?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/SmokeTests.js (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/SmokeTests.js Fri Jan 26 10:22:14 2007
@@ -0,0 +1,124 @@
+var tempGlobals = [];
+
+SmokeTests = function(){}
+
+
+SmokeTests.prototype.buttonLongTextWithImage = function(element, comparer){
+	element.setAttribute("image", "./images/foreground.JPG");
+	element.setAttribute("text", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla sed enim et lectus blandit aliquam. Ut dignissim aliquet diam. In feugiat, quam eget vehicula sagittis, mi metus fringilla ipsum, non elementum quam odio ut nisl. Aliquam sed orci quis felis laoreet dignissim.");
+	element.setAttribute("autoWrap", "true");
+	element.setAttribute("horizontalTextToImagePlacement", "left");
+	comparer.setAttribute("visible", "false");
+}
+
+SmokeTests.prototype.buttonImageResizing = function(element, comparer){
+
+	element.setAttribute("image", "./images/foreground.JPG");
+	element.setAttribute("width", "300px");
+	element.setAttribute("height", "100px");
+	element.setAttribute("imageWidth", "50px");
+	element.setAttribute("imageHeight", "50px");
+	element.setAttribute("horizontalAlign", "center");
+	element.setAttribute("fontSize", "12px");
+	comparer.setAttribute("visible", "true");
+	comparer.setAttribute("image", "./images/foreground.JPG");
+	comparer.setAttribute("width", "300px");
+	comparer.setAttribute("height", "100px");
+	comparer.setAttribute("imageWidth", "50px");
+	comparer.setAttribute("imageHeight", "50px");
+	comparer.setAttribute("fontSize", "12px");
+	comparer.setAttribute("horizontalAlign", "center");
+	tempGlobals['buttonImageResizing'] = element;
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('imageWidth', '500px')", 1000);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('imageHeight', '500px')", 1000);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('fontSize', '128px')", 1000);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('borderWidth', '30px')", 1000);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('horizontalAlign', 'right')", 1000);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('verticalAlign', 'bottom')", 1000);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('horizontalTextToImagePlacement', 'left')", 1000);
+	
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('imageWidth', '50px')", 2500);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('imageHeight', '50px')", 2500);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('fontSize', '12px')", 2500);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('borderWidth', '1px')", 2500);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('horizontalAlign', 'center')", 2500);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('verticalAlign', 'center')", 2500);
+	setTimeout("tempGlobals['buttonImageResizing'].setAttribute('horizontalTextToImagePlacement', 'right')", 2500);
+}
+
+//The lookup is the index in the tempGlobals array
+SmokeTests.prototype.makeTimedChanges = function(lookup, attribute, startValue, increment, endValue, timeInterval, startPause, suffix){
+		//If it's a timed increment thing for animating changes slowly, do the for loop.
+		if(increment != 0){
+			for(var i = startValue, j = 0; (increment > 0 && i <= endValue) || (increment < 0 && i >= endValue); i += increment, j++){
+				setTimeout("tempGlobals['" + lookup + "'].setAttribute('" + attribute + "', '" + i+suffix + "')", (j * timeInterval) + startPause);
+			}
+		}
+}
+
+SmokeTests.prototype.textPlacement = function(element, comparer){
+	element.setAttribute("image", "./images/foreground.JPG");
+	element.setAttribute("width", "300px");
+	element.setAttribute("height", "100px");
+	element.setAttribute("imageWidth", "50px");
+	element.setAttribute("imageHeight", "50px");
+	element.setAttribute("horizontalTextToImagePlacement", "left");
+	element.setAttribute("verticalTextToImagePlacement", "bottom");
+	comparer.setAttribute("visible", "false");
+}
+
+SmokeTests.prototype.images = function(element){
+	element.setAttribute("image", "./images/foreground.JPG");
+	element.setAttribute("width", "300px");
+	element.setAttribute("height", "100px");
+	element.setAttribute("imageWidth", "50px");
+	element.setAttribute("imageHeight", "50px");
+	element.setAttribute("pressedImage", "./images/loading.gif");
+	element.setAttribute("mouseOverImage", "./images/smiley.jpg");
+	element.setAttribute("disabledImage", "./images/disabled.JPG");
+	element.setAttribute("backgroundImage", "./images/background.JPG");
+}
+
+
+SmokeTests.prototype.radioSelectDeselect = function(radio1, radio2){
+	radio2.setAttribute("selected", "true");
+	radio1.setAttribute("selected", "false");
+	radio2.setAttribute("selected", "false");	
+}
+	
+	
+SmokeTests.prototype.selectionTest = function(testComponent, event){
+	testComponent.setAttribute("selectionMode", "multiRow");
+    var mc = event.session.getMacroContainer();
+    var macro = mc.get("selectAll");
+    macro.execute();
+	tempGlobals['listBox'] = testComponent;
+	setTimeout("tempGlobals['listBox'].setAttribute('selectionMode', 'singleRow')", 1000);
+}
+
+// Not just passing the element because the desired value might not always be the text of the element
+SmokeTests.prototype.addAttributeTest = function(name, value, element){
+	if(!this._attributeTestList) this._attributeTestList = [];
+	//Not using push because it would push each array element individually
+	this._attributeTestList[this._attributeTestList.length] = new Array(name, value, element);
+}
+
+SmokeTests.prototype.runAttributeTests = function(element){
+	if(!this._attributeTestList) alert('No attributes to test');
+	else{
+
+		var attributeValuePair = this._attributeTestList.shift();
+		var message = "This test: " + attributeValuePair[0] + " => " + attributeValuePair[1];
+		while(attributeValuePair && confirm(message)){
+			element.setAttribute(attributeValuePair[0], attributeValuePair[1]);
+			attributeValuePair[2].setAttribute('selected', 'true');
+			message = "Last test: " + attributeValuePair[0] + " => " + attributeValuePair[1];
+			attributeValuePair = this._attributeTestList.shift();
+			if(attributeValuePair) message += "\nNext test: " + attributeValuePair[0] + " => " + attributeValuePair[1];
+		}
+		if(attributeValuePair) this._attributeTestList.unshift(attributeValuePair);
+	}
+}
+	
+	
+	
\ No newline at end of file

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/TableMco.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/TableMco.js?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/TableMco.js (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/TableMco.js Fri Jan 26 10:22:14 2007
@@ -0,0 +1,26 @@
+TableMco = function(){};
+
+TableMco.prototype = new Object() ;
+
+TableMco.prototype.startUpdates = function( tableElement ){
+	window.tableElement = tableElement;
+	window.intervalId = window.setInterval('tableMcoUpdate()',1000);
+}
+
+TableMco.prototype.stopUpdates= function( ){
+	if (window.intervalId){
+		window.clearInterval(window.intervalId);
+	}
+}
+
+tableMcoUpdate = function( ){
+	var tableElement = window.tableElement;
+	for (var i = 0; i<tableElement.childNodes.length; i++){
+		var row = tableElement.childNodes[i];
+		if (row.nodeName!=="row") continue;
+		
+		if (row.childNodes.length>1){
+			row.childNodes[1].setAttribute("text", "" + (new Date()).getTime());
+		}
+	}
+}
\ No newline at end of file

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/tabPane.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/tabPane.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/tabPane.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/tabPane.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,143 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+	<macro:macro id="removeElement" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="id('{0}')"/>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="appendTab" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:append select="id('testComponent')">
+				<xal:tab text="New Tab">
+					<xal:horizontalBoxPane width="500px">
+						<xal:label width="100px" text="I am a new tab!"/>
+					</xal:horizontalBoxPane>
+				</xal:tab>
+
+
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="insertBetweenTabs" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:insert-before select="id('tab3')">
+				<xal:tab text="New Tab">
+					<xal:horizontalBoxPane width="500px">
+						<xal:label width="100px" text="I am a new tab!"/>
+					</xal:horizontalBoxPane>
+				</xal:tab>
+			</xm:insert-before>
+		</xm:modifications>
+	</macro:macro>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+				id="testComponentFreePane">
+				<xal:tabPane id="testComponent" width="300px" height="200px">
+					<xal:tab text="Tab1" id="tab1"
+						onCreate="mco:attributeSetter.registerElement(this)">
+						<xal:freePane backgroundColor="#FFCCCC" width="100%" height="100%">
+							<xal:button text="button1" x="0px" width="25%"/>
+							<xal:button text="button2" x="30%" width="25%"/>
+							<xal:button text="button3" x="60%" width="25%"/>
+						</xal:freePane>
+					</xal:tab>
+					<xal:tab text="Tab2" id="tab2"
+						onCreate="mco:attributeSetter.registerElement(this)">
+						<verticalBoxPane backgroundColor="#CCFFCC">
+							<xal:button text="buttonA"/>
+							<xal:button text="buttonB"/>
+							<xal:button text="buttonC"/>
+						</verticalBoxPane>
+					</xal:tab>
+					<xal:tab text="Tab 3" id="tab3"
+						onCreate="mco:attributeSetter.registerElement(this)">
+						<horizontalBoxPane backgroundColor="#CCCCFF">
+							<xal:button text="buttonA" width="30px"/>
+							<xal:button text="buttonB"/>
+							<xal:button text="buttonC" width="30%"/>
+						</horizontalBoxPane>
+					</xal:tab>
+				</xal:tabPane>
+			</freePane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<label fontStyle="italic" autoWrap="true"
+								text="Note: Due to a bug, the height for this component has been pre-set in this component test. It can be changed without a problem, but its current displayed height is not its default"/>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="tab 1 selected:"/>
+								<radioButton group="selected1" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(tab1, 'selected' ,this.text)"/>
+								<radioButton group="selected1" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(tab1, 'selected' ,this.text)"/>
+								<radioButton group="selected1" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(tab1, 'selected')"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="tab 2 selected:"/>
+								<radioButton group="selected2" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(tab2, 'selected' ,this.text)"/>
+								<radioButton group="selected2" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(tab2, 'selected' ,this.text)"/>
+								<radioButton group="selected2" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(tab2, 'selected')"
+								/>
+							</horizontalBoxPane>
+							<horizontalBoxPane width="500px">
+								<label width="100px" text="tab 3 selected:"/>
+								<radioButton group="selected3" width="75px" text="true"
+									onSelect="mco:attributeSetter.setAttribute(tab3, 'selected' ,this.text)"/>
+								<radioButton group="selected3" width="75px" text="false"
+									onSelect="mco:attributeSetter.setAttribute(tab3, 'selected' ,this.text)"/>
+								<radioButton group="selected3" width="75px" text="(none)"
+									onSelect="mco:attributeSetter.removeAttribute(tab3, 'selected')"
+								/>
+							</horizontalBoxPane>
+
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<button text="Remove tab1"
+								onCommand="macro:removeElement.execute('tab1')"/>
+							<label text="Try with tab1 selected/deselected, try removing all 3 tabs"/>
+							<button text="Remove tab2"
+								onCommand="macro:removeElement.execute('tab2')"/>
+							<button text="Remove tab3"
+								onCommand="macro:removeElement.execute('tab3')"/>
+						</verticalBoxPane>
+						<verticalBoxPane width="500px">
+							<label height="25px" text=" " fontWeight="bold"/>
+							<button text="Insert Tab" onCommand="macro:appendTab.execute()"/>
+							<label
+								text="Insert a bunch at once, insert with various other tabs selected"/>
+							<button text="Insert tab between tab2 and tab3"
+								onCommand="macro:insertBetweenTabs.execute()"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/table.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/table.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/table.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/table.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,265 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+	<mco:mco xmlns:mco="http://openxal.org/core/mco" id="tableMco" class="TableMco"
+		src="src-js/TableMco.js"/>
+	<macro:macro id="addRow" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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="addMultiRow" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<cell text="New Cell 1"/>
+					<cell text="New Cell 2"/>
+					<cell text="New Cell 3"/>
+				</row>
+				<row>
+					<cell text="New Cell 4"/>
+					<cell text="New Cell 5"/>
+					<cell text="New Cell 6"/>
+				</row>
+			</xm:append>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="addColumn" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="id('myRow')"/>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="removeAllRows" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="//row"/>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="removeBranch" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="id('myBranch')"/>
+		</xm:modifications>
+	</macro:macro>
+
+	<macro:macro id="removeAllBranches" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:remove-element select="//row/row"/>
+		</xm:modifications>
+	</macro:macro>
+
+
+	<macro:macro id="branch" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/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>
+
+
+	<macro:macro id="addWidgetCells" xmlns:macro="http://openxal.org/core/macro">
+		<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+			<xm:append select="id('testComponent')">
+				<row>
+					<label text="label" id="widgetCellLabel"/>
+					<button text="button" id="widgetCellButton"/>
+					<checkBox text="checkBox" id="widgetCellCheckbox"/>
+				</row>
+				<row>
+					<radioButton text="radioButton" id="widgetCellRadioButton"/>
+					<textField text="textField" id="widgetCellTextField"/>
+					<passwordField text="passwordField" id="widgetCellPasswordField"/>
+				</row>
+				<row>
+					<comboBox height="25px" text="ComboBox" width="200px">
+						<listBox>
+							<listItem text="listItem #1"/>
+							<listItem text="comboBox" selected="true"/>
+							<listItem text="listItem #3"/>
+						</listBox>
+					</comboBox>
+					<label text="label"/>
+					<label text="label"/>
+				</row>
+
+			</xm:append>
+		</xm:modifications>
+
+	</macro:macro>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<horizontalBoxPane>
+				<freePane width="500px" height="300px" backgroundColor="#EEEEFF"
+					id="testComponentFreePane">
+					<table id="testComponent">
+						<column id="column1" onCreate="mco:attributeSetter.registerElement(this)">
+							<header text="Column 1"/>
+						</column>
+						<column>
+							<header text="Column 2"/>
+						</column>
+						<column id="column3" onCreate="mco:attributeSetter.registerElement(this)">
+							<header text="Column 3"/>
+						</column>
+						<row id="row1" onCreate="mco:attributeSetter.registerElement(this)">
+							<cell text="a"/>
+							<cell text="b"/>
+							<cell text="c"/>
+							<row id="myBranch" onCreate="mco:attributeSetter.registerElement(this)">
+								<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" onCreate="mco:attributeSetter.registerElement(this)">
+							<cell text="x"/>
+							<cell text="y"/>
+							<cell text="z"/>
+						</row>
+						<row id="row3" onCreate="mco:attributeSetter.registerElement(this)">
+							<cell text="aaaaaaaaaaaaaaaaaa"/>
+							<cell text="bbbbbb"/>
+							<cell text="ccccc"/>
+						</row>
+					</table>
+				</freePane>
+			</horizontalBoxPane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<label text="None right now"/>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<include href="includes/tableSmokeTests0.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<button width="200px" height="25px" horizontalAlign="center"
+								verticalAlign="center" text="Add Widget Cells"
+								onCommand="macro:addWidgetCells.execute()"/>
+							<label width="500px" autoWrap="true"
+								text="Cells can be replaced by various widgets. This will put those widgets into 3 rows"/>
+
+						</verticalBoxPane>
+						<verticalBoxPane>
+							<include href="includes/tableSmokeTests1.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+
+</xal>

Added: incubator/xap/trunk/samples/WebContent/examples/widgets/textArea.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/widgets/textArea.xal?view=auto&rev=500296
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/widgets/textArea.xal (added)
+++ incubator/xap/trunk/samples/WebContent/examples/widgets/textArea.xal Fri Jan 26 10:22:14 2007
@@ -0,0 +1,47 @@
+<xal xmlns="http://openxal.org/ui" xmlns:xal="http://openxal.org/ui">
+
+	<mco xmlns="http://openxal.org/core/mco" id="attributeSetter" class="AttributeTester"
+		src="src-js/AttributeTester.js"/>
+
+	<mco xmlns="http://openxal.org/core/mco" id="SmokeTests" class="SmokeTests"
+		src="src-js/SmokeTests.js"/>
+
+
+	<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
+		<xm:append select="/ui">
+			<freePane width="500px" height="300px" backgroundColor="#F0F0F0"
+				id="testComponentFreePane">
+				<xal:textArea id="testComponent"></xal:textArea>
+			</freePane>
+			<scrollPane width="1100px" height="500px"
+				onCreate="mco:attributeSetter.resizeScrollPane(this, testComponentFreePane)">
+				<verticalBoxPane>
+					<horizontalBoxPane borderStyle="solid" borderWidth="2px" borderColor="#000">
+						<verticalBoxPane width="500px">
+							<label height="25px" text="Specific tests:" fontWeight="bold"/>
+							<include href="includes/textAttributeTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<label text=" " height="25px"/>
+							<include href="includes/formElementTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+							<!-- textField specific properties -->
+							<label text=" " height="25px"/>
+							<include href="includes/editableFieldTests.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+						<!--standard test things -->
+						<include href="includes/standardButtons.xal"
+							xmlns="http://openxal.org/core/xinclude"/>
+					</horizontalBoxPane>
+					<horizontalBoxPane>
+						<verticalBoxPane>
+							<label height="25px" text="Smoke tests:" fontWeight="bold"/>
+							<include href="includes/attributeAutoTest.xal"
+								xmlns="http://openxal.org/core/xinclude"/>
+						</verticalBoxPane>
+					</horizontalBoxPane>
+				</verticalBoxPane>
+			</scrollPane>
+		</xm:append>
+	</xm:modifications>
+</xal>