Purpose
Controls the loading of a widget's contents in relation to the containing page.
The when attribute controls the load process. If the user will need to see the
content immediately, you can use the 'onload' value to load the widget content in the
background, immediately after the page. The 'defer' setting means that the client will defer
loading the content until it is requested by the user.
Attributes
Attribute |
Description |
Type |
Default |
Options |
Use |
src |
The URL from which the update can be retrieved, relative to the containing page |
xs:anyURI |
|
|
required |
when |
Indicates when the client should load the content |
xs:string |
onload |
onload, defer |
optional |
Action
Action |
Description |
execute |
Executes AJAX request |
Property
Property |
Description |
Type |
Access |
src |
The URL from which the data can be retrieved |
xs:anyURl |
read/write |
Events
Event |
Description |
failed |
The event is sent when an AJAX request fails |
succeeded |
The event is sent when an AJAX request succeeds |
Example
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:widget="http://www.volantis.com/xmlns/2006/05/widget">
<head>
<title>widget:load</title>
</head>
<body>
<div>
<widget:folding-item>
<widget:summary>Cracow</widget:summary>
<widget:detail>
<widget:load
src="http://localhost:8080/mcs/projects/client-app/service/folding-item?itemId=Cracow"/>
</widget:detail>
</widget:folding-item>
<widget:folding-item>
<widget:summary>Vienna</widget:summary>
<widget:detail>
<widget:load
src="http://localhost:8080/mcs/projects/client-app/service/folding-item?itemId=Vienna"/>
</widget:detail>
</widget:folding-item>
</div>
</body>
</html>