A SERVICE OF

logo

SAP Online Help 07.09.2004
SAP NetWeaver Visual Composer: User Guide 162
Defining an HTML View
Use
You may want to create an iView that calls a URL. The HTML view can be a stand-alone
element or part of any iView, requiring no connections to other elements in the same iView.
Alternatively, the HTML view can be mapped to receive a URL input from a data service. This
can be useful with "search" URLs, such as Google or an international phone book.
Procedures
To define a standalone HTML view:
...
1. In the Design workspace, double-click the iView icon to open it.
2. Choose Model Add Elements.
3. From the Elements task panel, drag the HTML View icon to the workspace.
4. Select the HTML View icon and choose Model Define Properties.
5. In the URL address field in the Display list of properties, select the text and overwrite it
with the required URL.
To map the output of a data service to an HTML view, via a table view:
...
...
1. In the Design workspace, double-click the iView icon to open it.
2. Choose Model Add Elements.
3. Create the input side of the iView, with a data service and its input form.
4. Create a table view as output from the data service.
5. From the Elements task panel, drag the HTML View icon to the workspace.
6. Connect the appropriate output port of the table to the in port of the HTML view.
7. Right-click the output port of the table and choose Define Fields from the context menu.
8. Add a field to the table (see Defining UI Component Field Properties [Page
149]) and
name it appropriately.
9. In the Fields task panel, select the new field and open the Expressions Editor (see
Using the Expressions Editor [Page
152]). In the Computation column of the row of the
new field, enter the URL, entering the name of the field whose value will be used as
part of the URL.
You have an iView that provides information about a company called FlyingHigh
Corporation, which has two main offices: one in the United States and one in
Asia Pacific. Each of these offices maintains its own web site.
In the iView, you have a data service that outputs the details about the
FlyingHigh offices. One of the fields of the output table is Office_Cntry. You
have added another field, URL, to the table. You want to display the URL of the
office that the user selects in the table. You would therefore enter the following
formula into the Computation cell of the URL field:
IF(@Office_Cntry=US,’www.flyinghigh_us.com’,
’www.flyinghigh_ap.com’).