The ch.dunes.web.webview.components.WebObjectComponent class provides methods to obtain information from objects in the Orchestrator server. The WebObjectComponent class extends WebviewComponent.

You use the WebObjectComponent class in conjunction with vmo:ListPane components.

The vmo:ListPane component inserts a list of objects into a Web view. To display information about an object in the list in another Web view page or panel, the HTML file that displays that information must contain a Web view component that implements the WebObjectComponent class.

The WebObjectComponent class defines the following methods that obtain properties from objects in the Orchestrator server.

Table 1. Methods of the WebObjectComponent class

Method

Retruns

Description

get(java.lang.String name)

java.lang.Object

Obtains the property of the given name.

get(
java.lang.String name, 
java.lang.String valueIfNotFound

java.lang.Object

Obtains the property of the given name.

toParam()

java.lang.String

Obtains the output parameter of an Action or Workflow object.

The WebObjectComponent class inherits the following methods from class java.lang.Object:

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,wait, wait, wait

Constructor

WebObjectComponent()

Using WebObjectComponent to Display Object Information

The following vmo:ListPane component displays information about the objects it lists in an HTML page called panel.html:

<p jwcid="@vmo:ListPane"
					action="getVirtualMachineList"
					actionParameters="attribute:vmFolder"
					detailUrl="./panel.html"/>

The panel.html file contains a reference to a Web view component called DisplayVmInfo:

<vmo jwcid="@DisplayVmInfo" urlParameter="itemId" />

The DisplayVmInfo.jwc component specification file implements 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>

The DisplayVmInfo.html component template file uses WebObjectComponent.get() methods in OGNL statements to display object properties in panel.html:

<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>