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/05 06:45:11 UTC
svn commit: r453116 - in
/incubator/xap/trunk/WebContent/examples/dataBinding: Employees_json.js
jsonDatasource.html jsonDatasource.xal simpleDocumentDatasource_0.html
simpleEmployees.html simpleEmployees.xal
Author: mturyn
Date: Wed Oct 4 23:45:10 2006
New Revision: 453116
URL: http://svn.apache.org/viewvc?view=rev&rev=453116
Log:
Cleaned up layout.
Modified:
incubator/xap/trunk/WebContent/examples/dataBinding/Employees_json.js
incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.html
incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.xal
incubator/xap/trunk/WebContent/examples/dataBinding/simpleDocumentDatasource_0.html
incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.html
incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.xal
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/Employees_json.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/Employees_json.js?view=diff&rev=453116&r1=453115&r2=453116
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/Employees_json.js (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/Employees_json.js Wed Oct 4 23:45:10 2006
@@ -1,6 +1,5 @@
var employees = {
"array":[
- {"lname":"Last name", "fname":"First name", "id":"i.d."},
{"lname":"Doe", "fname":"John", "id":"001"},
{"lname":"Roe", "fname":"Mary", "id":"002"},
{"lname":"Smith", "fname":"Winston", "id":"003"},
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.html?view=diff&rev=453116&r1=453115&r2=453116
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.html (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.html Wed Oct 4 23:45:10 2006
@@ -1,7 +1,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Getting data from a JSON-compliant data source:</title>
+ <title>Iterating over data from a JSON-compliant data source:</title>
<style type="text/css">
<!--
@@ -26,7 +26,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(
@@ -58,11 +58,15 @@
) ;
Xap._loadDebuggables() ;
- </script>
+ </script -->
</head>
<body onload="Xap.createAllPredefinedSessions();">
<div style="left:100px;top:100px" xapId="JsonExample" xapSrc="jsonDatasource.xal" xapToolkit="dojo" xapContext="../../"></div>
+
+ <div >
+ (see <a href="jsonDatasource.xal">jsonDatasource.xal</a>, <a href="Employees_json.js">Employees_json.js</a>.)
+ </div>
</body>
</html>
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.xal?view=diff&rev=453116&r1=453115&r2=453116
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.xal (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/jsonDatasource.xal Wed Oct 4 23:45:10 2006
@@ -12,24 +12,36 @@
source="employees"
/>
+
<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
<xm:append select="/xal">
- <xal:table id="testComponent" width="600px">
+ <xal:table id="testComponent" width="540px" height="300px">
+
+ <xal:row>
+ <xal:cell width="180px" text="i.d." fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell width="180px" text="Last name" fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell width="180px" text="First name" fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ </xal:row>
+
+ <!-- Setting cell widths doesn't seem to work as well as this: -->
<xal:column>
- <xal:header text="i.d." />
+ <xal:header width="180px" height="-5px" />
</xal:column>
<xal:column>
- <xal:header text="" />
- </xal:column>
- <xal:column>
- <xal:header text="last name" />
- </xal:column>
+ <xal:header width="180px" height="-5px" />
+ </xal:column>
<xal:column>
- <xal:header text="first name" />
- </xal:column>
-
+ <xal:header width="180px" height="-5px" />
+ </xal:column>
+
+
+ <xal:row>
+ <xal:cell width="180px" />
+ <xal:cell width="180px" />
+ <xal:cell width="180px" />
+ </xal:row>
<!-- Iterator -->
<iterator
@@ -46,11 +58,9 @@
instance, which will admit the following
method:
-->
- <xal:cell text="{*('id')}"/>
- <xal:cell text=""/>
- <xal:cell text="{*('fname')}"/>
- <xal:cell text="{*('lname')}"/>
-
+ <xal:cell text="{*('id')}" textAlign="right" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell text="{*('lname')}" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell text="{*('fname')}" fontFamily="Garamond" fontSize="11pt"/>
</xal:row>
</iterator>
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/simpleDocumentDatasource_0.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/simpleDocumentDatasource_0.html?view=diff&rev=453116&r1=453115&r2=453116
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/simpleDocumentDatasource_0.html (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/simpleDocumentDatasource_0.html Wed Oct 4 23:45:10 2006
@@ -1,7 +1,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Getting H.R. data from an XML document data source:</title>
+ <title>Iterating over H.R. data from an XML document data source:</title>
<style type="text/css">
<!--
@@ -61,6 +61,8 @@
</head>
<body onload="Xap.createAllPredefinedSessions();">
+ (See <a href="simpleDocumentDatasource.xal">simpleDocumentDatasource_0.xal</a>, <a href="employees.xml">translator.xml</a>.)
<div style="left:100px;top:100px" xapId="SddsExample" xapSrc="simpleDocumentDatasource_0.xal" xapToolkit="dojo" xapContext="../../"></div>
</body>
+
</html>
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.html?view=diff&rev=453116&r1=453115&r2=453116
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.html (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.html Wed Oct 4 23:45:10 2006
@@ -1,7 +1,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Getting an attribute from an XML document data source:</title>
+ <title>Iterating over records from an XML document data source:</title>
<style type="text/css">
<!--
@@ -64,5 +64,8 @@
<body onload="Xap.createAllPredefinedSessions();">
<div style="left:100px;top:100px" xapId="SddsExample" xapSrc="simpleEmployees.xal" xapToolkit="dojo" xapContext="../../"></div>
+ <div top="400px">
+ (see <a href="simpleEmployees.xal">simpleEmployees.xal</a>, <a href="employees.xml">employees.xml</a>.)
+ </div>
</body>
</html>
Modified: incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.xal?view=diff&rev=453116&r1=453115&r2=453116
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.xal (original)
+++ incubator/xap/trunk/WebContent/examples/dataBinding/simpleEmployees.xal Wed Oct 4 23:45:10 2006
@@ -19,25 +19,29 @@
<xm:append select="/xal">
- <xal:table id="testComponent" width="600px">
+ <xal:table id="testComponent" width="750px" height="400px">
+
+ <xal:row>
+ <xal:cell width="60px" text="i.d." fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell width="180px" text="Last name" fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell width="180px" text="First name" fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell width="180px" text="Middle name" fontWeight="bolder" fontFamily="Garamond" fontSize="11pt"/>
+ </xal:row>
+
+ <!-- Setting cell widths doesn't seem to work as well as this: -->
<xal:column>
- <xal:header text="i.d." />
+ <xal:header width="60px" height="-5px" />
</xal:column>
<xal:column>
- <xal:header text="" />
+ <xal:header width="180px" height="-5px" />
+ </xal:column>
+ <xal:column>
+ <xal:header width="180px" height="-5px" />
</xal:column>
<xal:column>
- <xal:header text="" />
+ <xal:header width="180px" height="-5px" />
</xal:column>
- <xal:column>
- <xal:header text="last name" />
- </xal:column>
- <xal:column>
- <xal:header text="first name" />
- </xal:column>
- <xal:column>
- <xal:header text="middle name" />
- </xal:column>
+
@@ -45,12 +49,11 @@
<iterator xmlns="http://www.openxal.org/data" name="anIterator" dataSource="myDataSource" select="//employee" type="ONE_WAY">
<xal:row>
- <xal:cell text="{*('@id')}" />
- <xal:cell/>
- <xal:cell/>
- <xal:cell text="{*('@lname')}" />
- <xal:cell text="{*('@fname')}" />
- <xal:cell text="{*('@mname')}" />
+ <xal:cell text="{*('@id')}" fontFamily="Garamond" fontSize="11pt"/>
+
+ <xal:cell text="{*('@lname')}" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell text="{*('@fname')}" fontFamily="Garamond" fontSize="11pt"/>
+ <xal:cell text="{*('@mname')}" fontFamily="Garamond" fontSize="11pt"/>
</xal:row>
</iterator>
</xal:table>