5.5
Table Of Contents
- Developing Web Views for VMware vCenter Orchestrator
- Contents
- Developing Web Views for VMware vCenter Orchestrator
- Web View Overview
- Weboperator Web View
- Web View Development Tasks to Perform in Orchestrator
- Create a Web View Skeleton
- Export a Web View as a Template
- Create a Web View from a Template
- Define a Web View Template as a Resource Element
- Create a Web View from a Resource Element Template
- Export Web View Files to a Working Folder
- Configure the Server for Web View Development
- Import Web View Files from a Working Folder
- Create a Web View Attribute
- Add a Resource Element to a Web View
- Disable Web View Development Mode
- Publish a Web View
- File Structure of a Web View
- Web View Home Page
- Web View Components
- Tapestry Web View Components
- Creating Tapestry Web View Components
- Orchestrator Tapestry Component Library
- vco:DisplayProperty Component
- vco:IfMemberOf Component
- vco:IncludeJavascript Component
- vco:IncludeStylesheet Component
- vco:IncludeWorkflowHeader Component
- vco:ListPane Component
- vco:Login Component
- vco:PageAccessControl Component
- vco:TaskAction Component
- vco:WebformContainer Component
- vco:WorkflowLink Component
- Accessing Server Objects from URLs
- Create a Simple Web View Using the Default Template
- Import the Default Web View Template
- Export the Virtual Machine Manager Web View to a Working Folder
- Provide Unique Component Names
- Configure the Server for Web View Development
- Edit the Virtual Machine Manager Web View Home Page
- Add a vco:ListPane Component to the Web View Home Page
- Define the Web View Attributes for the vco:ListPane Component
- Create a Web View Component to Display Virtual Machine Information
- Create a Web View Tab by Using the Menu Component
- Add Links to Run Workflows from a Web View by Using the vco:WorkflowLink Component
- Customize the Web View Interface
- Publish the Virtual Machine Manager Web View
- Index
Example: Web View Template Access.jwc File
The following example shows a component specification file that implements the WebviewComponent Java
interface.
<?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.WebviewComponent">
</component-specification>
Tapestry Component Template File
A Tapestry component template file is an HTML file that defines the layout of a Web view component.
The name of the Tapestry component template file must match the name of the component specification
JWC file.
Example: Web View Template Access.html File
The following example shows a component template file that displays the user's username and adds a
Logout link to a Web view page.
<strong>
<vco jwcid="@Insert" value="ognl:page.user.displayName" />
</strong>
<vco jwcid="@Insert" value="ognl:' (' + page.getUsername() + ')'" />
|
<a jwcid="@Any" href="ognl:page.webviewUrl + '?logout'">Logout</a>
WebviewComponent Class
The ch.dunes.web.webview.WebviewComponent class is the main class for Web view components. All Web
view component specification JWC files must implement this class.
Implementing the WebviewComponent class in an Orchestrator Web view component allows you to call
methods in a Web view page to perform various functions in the Orchestrator server, such as retrieving
attributes, making queries, getting and setting parameters and attributes, and implementing Dojo widgets in
the Web view component.
The WebviewComponent class extends the org.apache.tapestry.BaseComponent Tapestry class. The
BaseComponent class provides the implementation for all Tapestry components that implement an HTML
definition file.
The WebviewComponent class defines the following methods.
Table 6‑1. Methods of the WebviewComponent class
Method Returns Description
getWebviewPage() ch.dunes.web.webview.WebviewPage Returns the WebviewPage object
of the page that contains this
component.
getWebview() ch.dunes.model.webview.WebView Returns the WebView object that
represents the current Web view.
getRequestCycle() org.apache.tapestry.IRequestCycle The IRequestCycle object is the
Tapestry object that controls
every access to the server.
Developing Web Views for VMware vCenter Orchestrator
28 VMware, Inc.