Author: jsundman
Date: 2007-11-13 15:02:22 -0800 (Tue, 13 Nov 2007)
New Revision: 7238
Added:
openlaszlo/trunk/docs/src/developers/programs/data-master-detail.lzx
Modified:
openlaszlo/trunk/docs/src/developers/data-overview.dbk
openlaszlo/trunk/docs/src/developers/data-patterns-and-best-practices.dbk
openlaszlo/trunk/docs/src/developers/dynamic-databinding.dbk
openlaszlo/trunk/docs/src/developers/programs/data-accessing-lzdataelement.lzx
openlaszlo/trunk/docs/src/developers/programs/data-attributepathbinding.lzx
openlaszlo/trunk/docs/src/developers/programs/data-concatenatingattributes.lzx
openlaszlo/trunk/docs/src/developers/programs/data-setattribute_p.lzx
openlaszlo/trunk/docs/src/developers/programs/data-xpathstring.lzx
openlaszlo/trunk/docs/src/developers/programs/datapointer-basics.lzx
openlaszlo/trunk/docs/src/developers/programs/datapointer-creating-node.lzx
openlaszlo/trunk/docs/src/developers/programs/datapointermove.lzx
openlaszlo/trunk/docs/src/developers/static-databinding.dbk
Log:
checkpointing data docs. Changed path to programs/sharddata in example
programs; they work now.
Modified: openlaszlo/trunk/docs/src/developers/data-overview.dbk
===================================================================
--- openlaszlo/trunk/docs/src/developers/data-overview.dbk 2007-11-13
22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/data-overview.dbk 2007-11-13
23:02:22 UTC (rev 7238)
@@ -324,7 +324,7 @@
, which provide a convenient, tag-based
mechanism for typical data manipulation. By using datapointers to move through
the data, you control the behavior of views that are bound to that data.
</para>
-<para/></section></section></section><section
id="databinding.datasets"><title>OpenLaszlo datasets and data nodes</title>
+<para/></section></section></section><section>
id="databinding.datasets"><title>OpenLaszlo datasets and data nodes</title>
<para>
Data in OpenLaszlo applications can be declared with a tag, or built up using
procedural (script) APIs. The script APIs operate on
<indexterm><primary>LzDataNode</primary></indexterm><classname>LzDataNode</classname>s.
</para>
@@ -481,7 +481,7 @@
often as is necessary.</para>
-<para>Remember that datapaths bind themselves to a view, so if the data
changes, so will the view. </para>
+<para>Remember that datapaths bind themselves to a view, so if the data
changes, so does the view. </para>
<para/></section></section></section><section
id="databinding.including"><title>Ways to include data</title>
<para>
Modified:
openlaszlo/trunk/docs/src/developers/data-patterns-and-best-practices.dbk
===================================================================
--- openlaszlo/trunk/docs/src/developers/data-patterns-and-best-practices.dbk
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/data-patterns-and-best-practices.dbk
2007-11-13 23:02:22 UTC (rev 7238)
@@ -7,11 +7,83 @@
</para>
<section><title>Master Detail</title>
<para>
+This examples shows the concept of master-detail. The main list displays
limited information (in this case, first name and last name). When the user
selects something in the list, the details area displays all of the information
about the item that is selected in the master list.
</para>
+<para>
+The details pane is driven (data bound) by the datapointer of the currently
selected item in the list. Inside the c contact, inside the master view, an
onclick event handler attribute sets the p attribute of the details views
datapath to be the p attribute of the datapath of the currently selected item
in the list.
+</para>
+<para>
+<contact name="c" datapath="person"
+ onclick="details.datapath.setAttribute('p', this.datapath.p)"/>
+</para>
+<example role="live-example">
+ <title>The master-detail pattern</title>
+ <programlisting language="lzx">
+ <textobject><textdata
fileref="programs/data-master-detail.lzx"/></textobject>
+ </programlisting>
+</example>
+</section>
+<section><title>Buffer Dataset</title>
+<para>
+The buffer dataset is a fundamental pattern for reconciling data images on the
client and the server, or between any two representations of the same data.
Changes made to one dataset are then propagated to another, which serves as a
"buffer". The contents of the buffer are then pushed to the ultimate
destination. In this way the buffer can be concerned with things like error
handling, timeouts, etc.
+</para>
+
+<section><title>Buffer Dataset Example</title>
+<para>
+
+This examnple shows a buffer dataset pattern that is a subset of a primary
dataset.
+<para>
+</para>
+Problem: Because of the "master" and "details" views are sharing a same
dataset, clicking the "Refresh Data" button will reset the user edited
information in the details view as well. So, we will create a buffer dataset
and we will databind the details view to it. We refresh this dataset
appropriately by populating it with the data node that data-replicates the
selected contact instance in the list.
+<para>
+</para>
+After the ds dataset declaration at the top of the canvas, notice the
following buffer dataset:
+<para>
+</para>
+<dataset name="dsbuffer">
+ <addressbook>
+ <contacts/>
+ </addressbook>
+</dataset>
+<para>
+</para>
+Locate the onclick event handler for the c contact tag. Notice the two
LzDatapointers, dp1 and dp2.
+<para>
+</para>
+<handler name="onclick">
+ var dp1 = new LzDatapointer();
+ var dp2 = new LzDatapointer();
+</handler>
+<para>
+</para>
+Using setPointer(), the dp1 datapointer points at the contact instance,
this.datapath.p:
+<para>
+</para>
+dp1.setPointer(this.datapath.p);
+<para>
+</para>
+ Next, using setXPath() and deleteNode(), any previous data already in the
dataset is deleted:
+<para>
+</para>
+dp2.setXPath("dsbuffer:/addressbook/contacts/person[1]");
+dp2.deleteNode();
+ Then, using setXPath() and addNodeFromPointer, copy the current node to the
target location:
+<para>
+</para>
+dp2.setXPath("dsbuffer:/addressbook/contacts");
+dp2.addNodeFromPointer(dp1);
+<para>
+</para>
+The last line of code inside the onclick event handler traces out to the Debug
window dp2.p:
+<para>
+</para>
+Debug.write(dp2.p);
+</para>
</section>
-<section><title>Buffer Dataset</title>
+
+
<example role="live-example">
<title>Buffer datasets</title>
<programlisting language="lzx">
Modified: openlaszlo/trunk/docs/src/developers/dynamic-databinding.dbk
===================================================================
--- openlaszlo/trunk/docs/src/developers/dynamic-databinding.dbk
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/dynamic-databinding.dbk
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,16 +1,16 @@
<chapter id="dynamic-databinding">
-<title>Dynamic Databinding</title>
+<title>Dynamic Databinding with Procedural (DOM) APIs</title>
+
<para>
-Databinding, part two: dynamic dataset creation with procedural (DOM) APIs
+The procedural (DOM) APIs for working with datasets allow you to build and
manipulate datasets at runtime using DOM conventions. There are three kinds of
objects: the absract class LzDataNode, and LzDataElement and LzTextNode which
are derived from it.
</para>
-<para>
-Summary: The procedural (DOM) APIs for working with datasets allow you to
build and manipulate datasets at runtime using DOM conventions. There are three
kinds of objects: the absract class LzDataNode, and LzDataElement and
LzTextNode which are derived from it.
-</para>
<para>In this chapter, we look at the attributes and methods on each of these
classes, and then look at short examples that show how to use them to create
and manipulate dataset objects.
</para>
+<section><title>
+Introduction and Philosphy of the DOM APIs</title>
<para>
-Introduction and Philosphy of the DOM APIs
</para>
+</section>
<section>
<title>The LzDataNode object</title>
<para>
@@ -26,8 +26,7 @@
<title>The LzDataElement object</title>
<para>An LzDataElement corresponds to a single XML node in a dataset. As such,
the LzDataElement is a subclass of LzDataNode, and inherits all of that class's
methods and attributes.
</para>
-
- LzDataElements have properties and methods that let you:
+LzDataElements have properties and methods that let you:
read and change the data
refer to parent or child nodes
<para>
@@ -45,285 +44,371 @@
-- attributes
-- methods
</para>
-Datapointer Basics
+</section>
+<section>
+<title>
+Datapointer Basics</title>
-This example shows the basic usage of the datapointer API.
-
-Show Value Of The First Name Of The First Node
- Inside the onclick event handler for the first button, the setAttribute()
method of the dp datapointer sets the xpath attribute to the first person node
in the dataset, ds:/addressbook/contacts/person[1]:
-
+<para>
+This example shows the basic usage of the datapointer API to manipulate nodes.
+</para>
+<para>
+To show the value of the first name of the first node, inside the onclick
event handler for the first button, the setAttribute() method of the dp
datapointer sets the xpath attribute to the first person node in the dataset,
ds:/addressbook/contacts/person[1]:
+</para>
+<para>
<button text="Show value of first name of the first <person/>
node">
<handler name="onclick">
dp.setAttribute("xpath","ds:/addressbook/contacts/person[1]");
</handler>
</button>
-
+</para>
+<para>
The onclick event handler next writes out to the Debug window the firstname
attribute. It uses getAttr() and pass firstname as the one argument to this
function, to retrieve the firstname attribute from the dataset:
-
+</para>
+<para>
Debug.write(dp.p.getAttr('firstname'));
-
-Show The Full Name Of The Owner Of the Address Book
-
-Inside the onclick event handler for the second button, the setAttribute()
method of the dp datapointer to set the xpath attribute to the owner of the
addressbook in the dataset,
-
+</para>
+<para>
+To show the full name of the owner of the address book, inside the onclick
event handler for the second button, the setAttribute() method of the dp
datapointer to set the xpath attribute to the owner of the addressbook in the
dataset,
+</para>
+<para>
ds:/addressbook/metainformation/addressbookowner[1]/:
-
+</para>
+<para>
<button text="Show the full name of the owner of the address book.">
<handler name="onclick">
-
dp.setAttribute("xpath","ds:/addressbook/metainformation/addressbookowner[1]/");
+</para>
+<para>
dp.setAttribute("xpath","ds:/addressbook/metainformation/addressbookowner[1]/");
</handler>
</button>
-
+</para>
+<para>
The onlclick handler next traces out to the Debug window the full name (both
firstname and lastname attributes) of the address book owner:
-
+</para>
+<para>
Debug.write(dp.p.getAttr('firstname'),dp.p.getAttr('lastname'));
-
-Show Total Number Of Nodes
-
-To show the total number of nodes, he onclick event handler for the third
button, uses the setAttribute() method of the dp datapointer to set the xpath
attribute to the contacts array in the dataset, ds:/addressbook/contacts:
-
+</para>
+<para>
+To show the total number of nodes, the onclick event handler for the third
button, uses the setAttribute() method of the dp datapointer to set the xpath
attribute to the contacts array in the dataset, ds:/addressbook/contacts:
+</para>
+<para>
<button text="Show total of <person/> nodes?">
<handler name="onclick">
dp.setAttribute("xpath","ds:/addressbook/contacts");
</handler>
</button>
-
+</para>
+<para>
The onclick handler next traces out to the Debug window the length of this
array. Note that in datasets, nodes have an array attribute called childNodes,
that is an array of the child nodes for that given node. Note also that arrays
have a length attribute:
-
+</para>
+<para>
Debug.write(dp.p.childNodes.length);
-
-Show The Value Of The Last Name Of The 2nd Node
-
- To show the value of the last name of the 2nd node, the onclick event
handler for the fourth button uses the setAttribute() method of the dp
datapointer to set the xpath attribute to the 2nd person node within the
dataset, ds:/addressbook/contacts/person[2]:
-
+</para>
+<para>
+To show the value of the last name of the second node, the onclick event
handler for the fourth button uses the setAttribute() method of the dp
datapointer to set the xpath attribute to the 2nd person node within the
dataset, ds:/addressbook/contacts/person[2]:
+</para>
+<para>
<button text="Show the value of the lastname of the 2nd node">
<handler name="onclick">
dp.setAttribute("xpath","ds:/addressbook/contacts/person[2]");
</handler>
</button>
-
+</para>
+<para>
The onclick event handler next writes to the Debug window the firstname
attribute:
-
+</para>
+<para>
Debug.write(dp.p.getAttr('firstname'));
-
-Capitalize The First Name Of The 2nd Node
-
+</para>
+<para>
To capitalize the first name of the of 2nd node, the onclick event handler for
the fifth button, uses the setAttribute() method of the dp datapointer to set
the xpath attribute to the second person node in the dataset,
ds:/addressbook/contacts/person[2]:
-
+</para>
+<para>
<button text="Capitalize the firstname of the 2nd node">
<handler name="onclick">
dp.setAttribute("xpath","ds:/addressbook/contacts/person[2]");
</handler>
</button>
-
+</para>
+<para>
Next, let's capitalize the firstname attribute of the node that our
datapointer is currently pointing at (from the previous step). Use setAttr() to
change the data in the dataset. Use toUpperCase() (a method of the String
class) to capitalize the string:
-
+</para>
+<para>
dp.p.setAttr('firstname',dp.p.getAttr('firstname').toUpperCase()) ;
-
-Last, trace the firstname attribute to the Debug window, to verify that it has
been capitalized:
-
+</para>
+<para>
+Last, we trace the firstname attribute to the Debug window, to verify that it
has been capitalized:
+</para>
+<para>
Debug.write("AFTER ",dp.p.getAttr('firstname'));
+</para>
<example role="live-example">
<title>Datapointer basics</title>
<programlisting language="lzx">
<textobject><textdata
fileref="programs/datapointer_basics.lzx"/></textobject>
</programlisting>
</example>
-
-
-Accessing LzDataElement
+</section>
+<section><title>Accessing LzDataElements</title>
+<para>
This example shows the different ways to access an LzDataElement (data within
a dataset).
-
+</para>
+<para>
Get LzDataElement using a Datapointer
Inside the onclick event handler for the first button, instantiate a new
LzDatapointer and name it dp:
-
+</para>
+<para>
<button>Get LzDataElement via datapointer
<handler name="onclick">
var dp = new LzDatapointer();
</handler>
</button>
+</para>
+<para>
After instantiating the datapointer, using setAttribute(), set its xpath
attribute to point at the contacts node within the ds dataset:
-
+</para>
+<para>
dp.setAttribute("xpath","ds:/addressbook/contacts");
+</para>
+<para>
Now that the dp datapointer is pointing at the appropriate node, trace the p
attribute of the dp datapointer to the Debug window. Note that the p attribute
is the attribute of the datapointer that points at the actual data, which is in
this case, an array of contact nodes:
-
+</para>
+<para>
Debug.write(dp.p);
Get LzDataElement using a datapath
Inside the onclick event handler for the second button, trace out to the
Debug window the p attribute of the datapath object of the mylist list:
-
+</para>
+<para>
<button>Get LzDataElement via datapath
<handler name="onclick">
Debug.write(mylist.datapath.p);
</handler>
</button>
-Create A New LzDataElement In JavaScript
+</para>
+</section>
+<section>
+<title>
+Creating A New LzDataElement In JavaScript </title>
+<para>
The onclick event handler for the third button, instantiates a new
LzDataElement and names it newNode. This is passed into the constructor
contacts as the first argument (what type of node to create), null as the
second argument (the text for the node [text that is between the opening and
closing tag]), and null as the third argument (node attributes):
-
+</para>
+<para>
<button>Create a new LzDataElement in JavaScript
<handler name="onclick">
var newNode = new LzDataElement('contacts', null, null);
</handler>
</button>
- After instantiating the LzDataElement, on the next line of code (still
inside the onclick event handler) it traces out newNode to the Debug window:
-
+</para>
+<para>
+After instantiating the LzDataElement, on the next line of code (still inside
the onclick event handler) it traces out newNode to the Debug window:
+</para>
+<para>
Debug.write(newNode);
-
+</para>
<example role="live-example">
<title>Different techniques for accessing LzDataElements</title>
<programlisting language="lzx">
<textobject><textdata
fileref="programs/data-accessing_lzdataelement.lzx"/></textobject>
</programlisting>
</example>
+
+</section>
+<section>
+<title>
+Creating a Node using a datapointer</title>
<para>
+This example shows how to indirectly create a data-bound item by creating a
new node in the source data using the datapointer API.
</para>
-</section>
-Creating a Node using a datapointer
-
-This example shows how to indirectly create a data-bound item by creating a
new node in the source data using the datapointer API.
-
-Print Total Person Nodes
-
+<para>
To print the total number of person nodes, the onclick event handler for the
first button uses the setAttribute() method of the dp datapointer to set the
xpath attribute to the contacts array in the dataset, ds:/addressbook/contacts:
-
+</para>
+<para>
<button text="Print total person nodes">
<handler name="onclick">
dp.setAttribute("xpath","ds:/addressbook/contacts");
</handler>
</button>
-
+</para>
+<para>
The onclick event handler next traces out to the Debug window the length of
this array. Recall that in datasets, nodes have an array attribute called
childNodes, that is an array of the child nodes for that given node. Arrays
have a length property, so the length of the array is equal to the number of
child nodes:
-
+</para>
+<para>
Debug.write("total child nodes "+dp.p.childNodes.length);
-
+</para>
+<para>
Inside the onclick event handler for the Add [EMAIL PROTECTED] button, use
setAttribute() to set the xpath to point at the contacts array node within the
dataset:
-
+</para>
+<para>
<button text="Add '[EMAIL PROTECTED]' item">
<handler name="onclick">
dp.setAttribute("xpath","ds:/addressbook/contacts");
</handler>
</button>
-
+</para>
+<para>
The addNode() method on the dp datapointer add a new person node to the
contacts array. The first argument to the addNode() method is the type of node
to create (in this case, a person node). The second argument is the text for
the node (the text contained between the opening and closing tag). The third
argument is an array of node attributes:
-
+</para>
+<para>
dp.addNode('person', 'Fred Flinestone', {'email':'[EMAIL PROTECTED]'});
+</para>
<example role="live-example">
<title>Datapointer basics</title>
<programlisting language="lzx">
<textobject><textdata
fileref="programs/datapointer_creating_node.lzx"/></textobject>
</programlisting>
</example>
-
-Destroying a Node
-
+</section>
+<section><title>
+Destroying a Node</title>
+<para>
This example shows an approach of removing a replicated item by destroying the
node (the data within the dataset) that it is pointing to. When you modify any
data in a dataset, any UI components that are data bound to that data are
automatically updated with the new data. So essentially, you work with the data
layer and the UI layer will automatically be updated.
-
+</para>
+<para>
The onclick event handler for the Destroy the selected node button,
instantiates an LzDatapointer and name it dp:
-
+</para>
+<para>
<button text="Destroy the selected node">
<handler name="onclick">
var dp = new LzDatapointer();
-
+</para>
+<para>
Right after the instantiation of the LzDatapointer (still inside the onclick
event handler) we create a variable called selectedIndex and set it equal to
mylist.value -1 (mylist.value is the selected items offset/index within the
list):
-
+</para>
+<para>
var selectedIndex = mylist.value - 1; //xpath is 1-based but scripts is 0-based
-
+</para>
+<para>
On the next line, code out an if statement that checks to see if selectedIndex
is a valid number (it might be undefined if there is nothing selected in the
list). We use !isNaN() (not, not a number) to achieve this:
-
+</para>
+<para>
if (!isNaN(selectedIndex)){
}
+</para>
+<para>
Inside the if block, a local variable called selectedNode is crreated and,
using the nodes array attribute of the mylist list, gets a reference to the
item in the list (currently, we have the index of what item in the list is
selected, so lets get the actual data at that index):
-
+</para>
+<para>
var selectedNode = mylist.myitem.nodes[selectedIndex];
-
+</para>
+<para>
As the next line of code, we point the dp datapointer at the node that we now
have a reference to (selectedNode). Use setPointer() to achieve this:
-
+</para>
+<para>
dp.setPointer(selectedNode);
-
+</para>
+<para>
Now that the datapointer is pointing at the data that we want to destroy, lets
remove that data from the dataset:
-
+</para>
+<para>
dp.deleteNode();
+</para>
-Pretty Printer
-
+</section>
+<section>
+<title>
+Pretty Printer</title>
+<para>
This example shows usage of the "pretty printer" utility class and usage of a
datapointer to manipulate a dataset at runtime. The pretty printer is used for
debugging. It provides a clean, visual representation of xml data. This can be
very useful when adding and deleting nodes (especially when the xml data is
very complex).
-
+</para>
+<para>
After the include tag at the top of the canvas, code out a datapointer tag
with the name from and a datapath of template_uk:/address:
-
+</para>
+<para>
<datapointer name="from" xpath="template_uk:/address" />
Create another datapointer tag with the name to and a datapath of
ds_complete:/contacts/contact[1]:
-
+</para>
+<para>
<datapointer name="to" xpath="ds_complete:/contacts/contact[1]" />
-
-Next, create an addresscopier node:
-
+</para>
+<para>
+Next, we create an addresscopier node:
+</para>
+<para>
<node name="addresscopier">
</node>
-
+</para>
+<para>
Inside this node, create three datapointers, with namesfrom_uk, from_us and
to. Set their xpath atributes to template_uk:/address, template_us:/address,
and ds_complete:/contacts, respectively:
-
+</para>
+<para>
<datapointer name="from_uk" xpath="template_uk:/address" />
<datapointer name="from_us" xpath="template_us:/address" />
<datapointer name="to" xpath="ds_complete:/contacts" />
-
-After the instantiation of the three datapointer, create a copyAddressNodes
method:
-
+</para>
+<para>
+After the instantiation of the three datapointers, we create a
copyAddressNodes method:
+</para>
+<para>
<method name="copyAddressNodes">
</method>
-
-As the first line of code inside the method, call the selectChild() method on
the to datapointer:
-
+</para>
+<para>
+The first line inside the method calls the selectChild() method on the to
datapointer:
+</para>
+<para>
to.selectChild();
Next, create a do-while loop and set the condition for the loop to
to.selectNext():
do {
} while ( to.selectNext() );
-
+</para>
+<para>
Inside the do-while loop, code out an if statement and do an xpath query on
the to datapointer and search for the string us:
-
+</para>
+<para>
if ( to.xpathQuery("@location") == "us" ) {
to.addNodeFromPointer( from_us );
}
+</para>
+<para>
+An else-if statement and xpath query on the datapointer searches for the
string uk:
- Code out an else-if statement and do an expath query on the to datapointer
and search for the string uk:
-
else if ( to.xpathQuery("@location") == " uk" ) {
to.addNodeFromPointer( from_uk );
}
+</para>
+<para>
Inside the onclick event handler for the Write Dataset button, using the
prettyPrint() method on the pp prettyprinter object, print to the Debug window
the xml data:
-
+</para>
+<para>
<button>Write Dataset
<handler name="onclick">
pp.prettyPrint();
</handler>
</button>
-
-Inside the onclick event handler for the copy one button, make a call to the
addNodeFromPointer method on the to datapointer and pass into it as its only
argument to from datapointer:
-
+</para>
+<para>
+The onclick event handler for the copy one button makes a call to the
addNodeFromPointer method on the to datapointer and passes into it as its only
argument to from datapointer:
+</para>
+<para>
<button>Copy one
<handler name="onclick">
to.addNodeFromPointer( from );
</handler>
</button>
- Last, make a call to the copyAddressNodes() method in the addresscopier
node, to make a copy of the address nodes:
-
+</para>
+<para>
+Lastly, it calls the copyAddressNodes() method in the addresscopier node, to
make a copy of the address nodes:
+</para>
+<para>
<button>Copy all
<handler name="onclick">
addresscopier.copyAddressNodes();
</handler>
</button>
-
+</para>
<example role="live-example">
<title>Datapointer basics</title>
<programlisting language="lzx">
<textobject><textdata
fileref="programs/data-prettyprinter.lzx"/></textobject>
</programlisting>
</example>
-
+</section>
</chapter>
Modified:
openlaszlo/trunk/docs/src/developers/programs/data-accessing-lzdataelement.lzx
===================================================================
---
openlaszlo/trunk/docs/src/developers/programs/data-accessing-lzdataelement.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++
openlaszlo/trunk/docs/src/developers/programs/data-accessing-lzdataelement.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -2,7 +2,7 @@
<debug x="0" y="150" width="450" height="200" />
- <dataset name="ds" src="../shareddata/contacts_full.xml" />
+ <dataset name="ds" src="./shareddata/contacts_full.xml" />
<list id="mylist" datapath="ds:/addressbook/contacts"
height="145" width="150">
Modified:
openlaszlo/trunk/docs/src/developers/programs/data-attributepathbinding.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/data-attributepathbinding.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/programs/data-attributepathbinding.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,5 +1,5 @@
<canvas debug="true">
- <dataset name="dset" src="../shareddata/contacts_full.xml"/>
+ <dataset name="dset" src="./shareddata/contacts_full.xml"/>
<simplelayout axis="y" spacing="2" />
@@ -20,7 +20,7 @@
<view name="myimage" datapath="dset:/addressbook/contacts/person[1]">
<attribute name="imagefile" value="$path{'@thumbnail'}"/>
<handler name="ondata">
- var imagepath = "../sharedresources/headshots/" + this.imagefile;
+ var imagepath = "./sharedresources/headshots/" + this.imagefile;
Debug.write(imagepath);
this.setSource(imagepath);
</handler>
@@ -31,7 +31,7 @@
<view name="myimage2"
datapath="dset:/addressbook/contacts/person[2]/@thumbnail">
<method name="applyData">
- var imagepath = "../sharedresources/headshots/" + this.data;
+ var imagepath = "./sharedresources/headshots/" + this.data;
Debug.write(imagepath);
this.setSource(imagepath);
</method>
Modified:
openlaszlo/trunk/docs/src/developers/programs/data-concatenatingattributes.lzx
===================================================================
---
openlaszlo/trunk/docs/src/developers/programs/data-concatenatingattributes.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++
openlaszlo/trunk/docs/src/developers/programs/data-concatenatingattributes.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,5 +1,5 @@
<canvas debug="true">
- <dataset name="dset" src="../shareddata/contacts_full.xml"/>
+ <dataset name="dset" src="./shareddata/contacts_full.xml"/>
<!-- Create a view with a text field that concatenates the first and last
name as the value of the text field -->
<view datapath="dset:/addressbook/contacts/person[1]">
Added: openlaszlo/trunk/docs/src/developers/programs/data-master-detail.lzx
Property changes on:
openlaszlo/trunk/docs/src/developers/programs/data-master-detail.lzx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: openlaszlo/trunk/docs/src/developers/programs/data-setattribute_p.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/data-setattribute_p.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/programs/data-setattribute_p.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,5 +1,5 @@
<canvas debug="true">
- <dataset name="dset" src="../shareddata/contacts_full.xml"/>
+ <dataset name="dset" src="./shareddata/contacts_full.xml"/>
<simplelayout axis="y" spacing="3"/>
Modified: openlaszlo/trunk/docs/src/developers/programs/data-xpathstring.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/data-xpathstring.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/programs/data-xpathstring.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,5 +1,5 @@
<canvas debug="true">
- <dataset name="dset" src="../shareddata/contacts_full.xml"/>
+ <dataset name="dset" src="./shareddata/contacts_full.xml"/>
<attribute name="idx" value="2" />
<simplelayout axis="y" spacing="3" />
Modified: openlaszlo/trunk/docs/src/developers/programs/datapointer-basics.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/datapointer-basics.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/programs/datapointer-basics.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,5 +1,5 @@
<canvas debug="true">
- <dataset name="ds" src="../shareddata/contacts_full.xml" />
+ <dataset name="ds" src="./shareddata/contacts_full.xml" />
<datapointer name="dp" />
<window title="Datapointer usage">
Modified:
openlaszlo/trunk/docs/src/developers/programs/datapointer-creating-node.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/datapointer-creating-node.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/programs/datapointer-creating-node.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,6 +1,6 @@
<canvas debug="true">
<include href="lz/datacombobox.lzx"/>
- <dataset name="ds" src="../shareddata/contacts_full.xml" />
+ <dataset name="ds" src="./shareddata/contacts_full.xml" />
<datapointer name="dp" />
<simplelayout />
Modified: openlaszlo/trunk/docs/src/developers/programs/datapointermove.lzx
===================================================================
--- openlaszlo/trunk/docs/src/developers/programs/datapointermove.lzx
2007-11-13 22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/programs/datapointermove.lzx
2007-11-13 23:02:22 UTC (rev 7238)
@@ -1,5 +1,5 @@
<canvas debug="true">
- <dataset name="dset" src="../shareddata/contacts_full.xml"/>
+ <dataset name="dset" src="./shareddata/contacts_full.xml"/>
<simplelayout axis="y" spacing="3" />
Modified: openlaszlo/trunk/docs/src/developers/static-databinding.dbk
===================================================================
--- openlaszlo/trunk/docs/src/developers/static-databinding.dbk 2007-11-13
22:29:20 UTC (rev 7237)
+++ openlaszlo/trunk/docs/src/developers/static-databinding.dbk 2007-11-13
23:02:22 UTC (rev 7238)
@@ -90,7 +90,7 @@
</para>
<para>
<handler name="ondata">
-var imagepath = "../sharedresources/headshots/" + this.imagefile;
+var imagepath = "./sharedresources/headshots/" + this.imagefile;
Debug.write(imagepath);
this.setSource(imagepath);
</handler>
@@ -107,7 +107,7 @@
</para>
<para>
<method name="applyData">
-var imagepath = "../sharedresources/headshots/" + this.data;
+var imagepath = "./sharedresources/headshots/" + this.data;
Debug.write(imagepath);
this.setSource(imagepath);
</method>
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins