4.0

Table Of Contents
Example: Web View Template Access.html File
<strong>
<vmo jwcid="@Insert" value="ognl:page.user.displayName" />
</strong>
<vmo jwcid="@Insert" value="ognl:' (' + page.getUsername() + ')'" />
&nbsp;|&nbsp;
<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.
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.
getWebVisitor() ch.dunes.web.webview.WebVisitor
The WebVisitor object contains
information about the Web view
user for the server to use.
getParameter(java.lang.String
parameterName)
java.lang.Object
Returns a query parameter value,
or null if no query parameter is
provided in the request. If
multiple values are provided, it
returns the first value.
getParameters(java.lang.String
parameterName)
java.lang.Object[]
Retrieves an array of values for a
query parameter.
objectToJson(java.lang.Object obj) java.lang.String
Returns a JSON representation of
the object as a parameter.
objectToParam(java.lang.Object
obj)
java.lang.String
Returns a parameter string to
identify an object.
getAttribute(java.lang.String
attributeName, java.lang.Object
defaultValue)
java.lang.Object
Returns a Web view attribute, or
the default value if the attribute is
null or not set.
getAttribute(java.lang.String
attributeName)
java.lang.Object
Returns a Web view attribute.
Chapter 9 Developing Web Views
VMware, Inc. 297