22-Apr-05 (Created: 22-Apr-05) | More in 'laszlo'

laszlo: Getting the feetwet: Exercise 1

My first hello world


<canvas>
	<window>
	<text>Hello world</text>
	</window>
	
	<window>
	<text>Hello world dddd</text>
	</window>
</canvas>

This is my first attempt at the hello world

Second hello world


<canvas height="120">
 <dataset type="http" name="foldersDataSet" 
 	request="true"
    src="http://host//akc/display"
	querystring="arg1=10&arg2=satya&aspire_output_format=object-xml"/>
	
<window width="200">
	  <simplelayout spacing="5" axis="y"/>
	  <view datapath="foldersDataSet:/AspireDataSet/FoldersLoop1/row">
	    <simplelayout spacing="2" axis="x"/>
      	<text>+</text>
      	<text datapath="folder_name/text()"/>
	  </view>
</window>	  
</canvas>

This demonstrates

1. Defining a data set that points to a webserver capable of giving out an xml data set

2. A view is defined bound to that dataset at the row level

3. For each row, the view is painted where the + sign and the folder name are separated out on the x axis.

4. Each line is a separate view

5. These views are laid out vertically again

6. It is also interesting to notice the canvas size setting. This is helpful in pushing the viewing area to the bottom especially when you are developing a solution

7. Notice the ampersand sign escaped for the argument string. I have spent quite a bit of time debugging this.

Odd things

It will be interesting to know how the layouts work. Because they seem to apply to the nodes that follow. It is better to get a conceptual understanding of these