4.0

Table Of Contents
4 Add references to the Tapestry DTD and the WebObjectComponent Java class to the DisplayVmInfo.jwc
component specification file.
You refer to the DTD in the DOCTYPE metatag and use <component-specification> tags to refer to the
WebObjectComponent Java class.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE component-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<component-specification class="ch.dunes.web.webview.components.WebObjectComponent">
</component-specification>
5 Create a Web view component template called DisplayVmInfo.html in the \components folder.
The DisplayVmInfo.html file defines how to present the information that the component obtains.
6 Add a table to the DisplayVmInfo.html file to contain information about the virtual machines that are in
the list.
<table width="200" border="1">
<tr>
<td>Virtual machine name</td>
<td></td>
</tr>
<tr>
<td>Virtual machine attributes</td>
<td></td>
</tr>
<tr>
<td>Object ID</td>
<td></td>
</tr>
</table>
7 Add references to the standard Tapestry Insert component and OGNL statements to obtain properties
from the array of VC:VirtualMachine objects that the vmo:ListPane component obtains.
<table width="200" border="1">
<tr>
<td>Virtual machine name</td>
<td><vmo jwcid="@Insert" value="ognl:get('name')"/></td>
</tr>
<tr>
<td>Object ID</td>
<td><vmo jwcid="@Insert" value="ognl:get('id')"/></td>
</tr>
</table>
The value attributes of the Insert component use the WebObjectComponent.get() methods in OGNL
statements to obtain the following properties from the VC:VirtualMachine objects:
n
The name property to display the virtual machine name
n
The id property to display the Orchestrator ID of the virtual machine
Chapter 9 Developing Web Views
VMware, Inc. 321