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/10/11 21:59:43 UTC
svn commit: r462986 - in
/incubator/xap/trunk/WebContent/examples/dataBinding: Employees.js
javascriptDatasource.html javascriptDatasource.xal plus.gif rarrow.gif
Author: mturyn
Date: Wed Oct 11 14:59:41 2006
New Revision: 462986
URL: http://svn.apache.org/viewvc?view=rev&rev=462986
Log:
Trying to better explain what's going on in the select statements.
Added:
incubator/xap/trunk/WebContent/examples/dataBinding/plus.gif (with props)
incubator/xap/trunk/WebContent/examples/dataBinding/rarrow.gif (with props)
Modified:
incubator/xap/trunk/WebContent/examples/dataBinding/Employees.js
incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.html
incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.xal
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/Employees.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/Employees.js?view=diff&rev=462986&r1=462985&r2=462986
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/Employees.js (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/Employees.js Wed Oct 11 14:59:41 2006
@@ -29,7 +29,7 @@
if(!offset){
offset = 0 ;
}
- return ""+(offset+((3+anIndex)*50))+"px" ;
+ return ""+(40+offset+((3+anIndex)*50))+"px" ;
}
Employees.computeX= function(anIndex, offset){
@@ -40,7 +40,7 @@
}
Employees.prototype.second = function(){
- return "The second slot in this array will give us: "
+ return "Second slot: "
+Employees.array[1]+"." ;
}
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.html?view=diff&rev=462986&r1=462985&r2=462986
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.html (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.html Wed Oct 11 14:59:41 2006
@@ -27,7 +27,7 @@
mask forgetting a .require(<className>) in the code:
-->
- <!-- script language="JavaScript" type="text/javascript">
+ <script language="JavaScript" type="text/javascript">
Xap._sourceRootDir = "../../" ;
Xap.addDebuggables(
@@ -54,11 +54,12 @@
"xap.taghandling.AbstractTagImpl",
"xap.taghandling.AttributeConverter",
"xap.xml.dom.Document",
+ "xap.xml.sax.SaxParser",
"xap.Xap"
) ;
Xap._loadDebuggables() ;
- </script -->
+ </script>
</head>
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.xal?view=diff&rev=462986&r1=462985&r2=462986
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.xal (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/javascriptDatasource.xal Wed Oct 11 14:59:41 2006
@@ -12,7 +12,7 @@
<binding
xmlns="http://www.openxal.org/data"
dataSource="myDataSource"
- select="<currentElement>.second()"
+ select="<currentElement>.second()"
id="SECOND"
/>
@@ -40,19 +40,38 @@
<xal:label
y="50px"
- x="25px"
- width="280px"
height="40px"
+
+ x="15px"
+ width="250px"
+
alignHorizontal="center"
backgroundColor="#ddddff"
- text=" {bind(binding:SECOND)} "
+ text="select="<currentElement>.second()" "
/>
-
+
+ <xal:label img="plus.gif" x="270px" width="25px" y="50px" height="40px" alignHorizontal="left"/>
+
+ <xal:label
+ y="50px"
+ height="40px"
+
+ x="290px"
+ width="450px"
+
+ alignVertical="middle"
+ alignHorizontal="center"
+ backgroundColor="#ddddff"
+ text="Employees.second()=return "Second slot: "+Employees.array[1]+"." ;"
+ />
+
+ <xal:label img="rarrow.gif" x="740px" width="35px" y="50px" height="40px" alignHorizontal="center" />
+
<xal:label
y="50px"
- x="330px"
- width="590px"
- height="40px"
+ height="40px"
+ x="775px"
+ width="200px"
backgroundColor="#ffdddd"
alignHorizontal="center"
text="{bind(binding:SECOND)}"
@@ -65,48 +84,73 @@
x="0px"
width="990px"
height="40px"
- backgroundColor="#b0a0b0"
- text="[iteration starts]"
+ backgroundColor="#b0a0b0"
+ alignVertical="middle"
+ text="[iteration starts] "
/>
+ <xal:label
+ y="150px"
+ x="5px"
+ width="300px"
+ height="30px"
+ backgroundColor="#d0d0f0"
+ text=" "Iteration "+<currentCount>+" of "+<totalCount>"
+ />
+ <xal:label
+ y="150px"
+ x="400px"
+ width="120px"
+ height="30px"
+ backgroundColor="#d0d0f0"
+ text="<currentIndex>"
+ />
+ <xal:label
+ y="150px"
+ x="590px"
+ width="340px"
+ height="30px"
+ backgroundColor="#d0d0f0"
+ text="<currentElement>.lname+", "+<currentElement>.fname"
+ />
<!-- Iterator -->
<iterator
xmlns="http://www.openxal.org/data"
name="anIterator"
dataSource="myDataSource"
- select="<currentElement>.theArray()"
+ select="<currentElement>.theArray()"
type="ONE_WAY"
>
<xal:label
- y="{*('Employees.computeY(<currentIndex>)')}"
+ y="{*('Employees.computeY(<currentIndex>)')}"
x="20px"
width="292px"
height="40px"
backgroundColor="{mco:layout.nextColour()}"
alignHorizontal="center"
- text="{*('"Iteration "+<currentCount>+" of "+<totalCount>+"."')}"
+ text="{*('"Iteration "+<currentCount>+" of "+<totalCount>+"."')}"
/>
<xal:label
- y="{*('Employees.computeY(<currentIndex>)')}"
+ y="{*('Employees.computeY(<currentIndex>)')}"
x="318px"
width="288px"
height="40px"
backgroundColor="{mco:layout.thisColour()}"
alignHorizontal="center"
- text="{*('<currentElement>.id')}"
+ text="{*('<currentElement>.id')}"
/>
<xal:label
- y="{*('Employees.computeY(<currentIndex>)')}"
+ y="{*('Employees.computeY(<currentIndex>)')}"
x="612px"
width="290px"
height="40px"
backgroundColor="{mco:layout.thisColour()}"
- alignHorizontal="left"
- text="{*('". . . "+<currentElement>.lname+", "+<currentElement>.fname')}"
+ alignHorizontal="center"
+ text="{*('<currentElement>.lname+", "+<currentElement>.fname')}"
/>
</iterator>
@@ -115,9 +159,9 @@
id="iterStopLabel"
width="990px"
height="40px"
- y="600px"
+ y="650px"
backgroundColor="#b0a0b0"
- textAlign="center"
+ alignHorizontal="center"
text="[iteration ends]"
/>
@@ -129,7 +173,7 @@
width="990px"
height="40px"
backgroundColor="#b0a0b0"
- textAlign="center"
+ alignHorizontal="center"
text="[iteration ends]"
/ -->
Added: incubator/xap/trunk/WebContent/examples/dataBinding/plus.gif
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/plus.gif?view=auto&rev=462986
==============================================================================
Binary file - no diff available.
Propchange: incubator/xap/trunk/WebContent/examples/dataBinding/plus.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/xap/trunk/WebContent/examples/dataBinding/rarrow.gif
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/rarrow.gif?view=auto&rev=462986
==============================================================================
Binary file - no diff available.
Propchange: incubator/xap/trunk/WebContent/examples/dataBinding/rarrow.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream