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 mt...@apache.org on 2006/09/11 19:45:20 UTC
svn commit: r442303 - in
/incubator/xap/trunk/WebContent/examples/dataBinding: AttributeGetter.js
mcoAttribute.html mcoAttribute.xal
Author: mturyn
Date: Mon Sep 11 12:45:19 2006
New Revision: 442303
URL: http://svn.apache.org/viewvc?view=rev&rev=442303
Log:
Added other resolution examples, and labels for them.
Modified:
incubator/xap/trunk/WebContent/examples/dataBinding/AttributeGetter.js
incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.html
incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.xal
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/AttributeGetter.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/AttributeGetter.js?view=diff&rev=442303&r1=442302&r2=442303
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/AttributeGetter.js (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/AttributeGetter.js Mon Sep 11 12:45:19 2006
@@ -5,4 +5,8 @@
AttributeGetter.prototype.getText = function(){
alert("Getting text from MCO.");
return "Got this text from an MCO." ;
+}
+
+AttributeGetter.prototype.toString =function(){
+ return "This is an AttributeGetter instance mco." ;
}
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.html?view=diff&rev=442303&r1=442302&r2=442303
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.html (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.html Mon Sep 11 12:45:19 2006
@@ -18,6 +18,8 @@
<script language="JavaScript" type="text/javascript" src="../../xapcore.js"></script>
<script language="JavaScript" type="text/javascript" src="AttributeGetter.js"></script>
+ <script language="JavaScript" type="text/javascript" src="../../src/ResolutionHandler.js"></script>
+
<script language="JavaScript" src="../../src/xml/sax/SaxParser"> </script>
</head>
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.xal?view=diff&rev=442303&r1=442302&r2=442303
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.xal (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/mcoAttribute.xal Mon Sep 11 12:45:19 2006
@@ -10,12 +10,181 @@
<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
<xm:append select="/xal">
+
+ <xal:label
+ id="topLabel"
+ width="240px"
+ height="50px"
+ text="Various mco arg resolutions: first expression, then that to which it resolves:"
+ />
- <xal:textField
+ <xal:label
+ y="50px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{this\}"
+ />
+
+ <xal:label
+ y="50px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{this}"
+ id="testComponent_0"
+ />
+
+
+ <xal:label
+ y="100px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{this.width\}"
+ />
+
+ <xal:label
+ y="100px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{this.width}"
+ id="testComponent_1"
+ />
+
+
+
+
+ <xal:label
+ y="150px"
width="200px"
- text="{mco:attributeGetter.getText()}"
- id="testComponent"
+ height="40px"
+ align="center"
+ text="\{topLabel\}"
+ />
+
+ <xal:label
+ y="150px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{topLabel}"
+ id="testComponent_2"
/>
+
+
+ <xal:label
+ y="200px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{topLabel.text\}"
+ />
+
+ <xal:label
+ y="200px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{topLabel.text}"
+ id="testComponent_3"
+ />
+
+ <xal:label
+ y="250px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{"A text message."\}"
+ />
+
+ <xal:label
+ y="250px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{"A text message."}"
+ id="testComponent_4"
+ />
+
+
+ <xal:label
+ y="300px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{3.1416\}"
+ />
+
+ <xal:label
+ y="300px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{3.1416}"
+ id="testComponent_5"
+ />
+
+ <xal:label
+ y="350px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{false\}"
+ />
+
+ <xal:label
+ y="350px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{false}"
+ id="testComponent_6"
+ />
+
+ <xal:label
+ y="400px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{mco:attributeGetter\}"
+ />
+
+ <xal:label
+ y="400px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{mco:attributeGetter}"
+ id="testComponent_7"
+ />
+
+ <xal:label
+ y="450px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="\{mco:attributeGetter.getText()\}"
+ />
+
+ <xal:label
+ y="450px"
+ x="40px"
+ width="200px"
+ height="40px"
+ align="center"
+ text="{mco:attributeGetter.getText()}"
+ id="testComponent_8"
+ />
</xm:append>