66 iSeries Access for Web V5R2 and WebSphere Host Publisher V4.0
Site Support
This link uses the iSeries message support to provide customers a way to send their
comments and questions to the boat company. This example has a user profile set up for
receiving customer comments. The boat company can have someone monitor these
messages or it may have an application process the messages. See Figure 3-55.
The source for this link is:
<a href="/webaccess/iWASendMessage">Send us a message</a>
Figure 3-55 Sending a message
Weather Conditions
This link does not use any iSeries Access for Web support. It is part of the example to
demonstrate that home page content is not restricted to iSeries Access for Web functions.
3.5.5 Home page example: Administrator view
Figure 3-56 shows the administrator view of the home page for our boat company. It contains
the same links available from the customer view plus additional links that are only accessible
by the company administrator.
Chapter 3. Using iSeries Access for Web 67
Figure 3-56 Home page: Administrator view
Different content for different users
In our boat company example, the only differences between the customer view and the
administrator view are additional service links in the administrator view. The home pages for
both user types can be implemented with a single file, using the iSeries Access for Web
include list support. Like the %%CONTENT%% replacement tag in the template file, your
home page can contain an include list replacement tag. The format of the include list tag is:
%%include list=file%%
file
identifies a file containing list items to include as links in a table. The list of items included
can be tailored to an individual user, a group of users, or all users (*PUBLIC). When the home
page is displayed, this tag is replaced with the appropriate set of links for the current user
profile. You can find a sample include list in the directory
/QIBM/ProdData/Access/Web2/config/info.policies.
Our boat example adds links only if the current user is BOATADMIN. We add the following
lines to the home page to do this:
<tr>
<td>%%include list=/boats/homepage/adminserv.policies%%</td>
</tr>
68 iSeries Access for Web V5R2 and WebSphere Host Publisher V4.0
The contents of the adminserv.policies file are:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QiwaPolicies>
<profile name="BOATADMIN">
<homepage>
<listItem name="Work with invoices">
<href>/webaccess/iWASpool?queue=BOATS/INVOICES</href>
</listItem>
<listItem name="Check messages">
<href>/webaccess/iWAMessages?msgq=BOATS/COMMENTS</href>
</listItem>
<listItem name="Check system messages">
<href>/webaccess/iWAMessages?msgq=QSYS/QSYSOPR</href>
</listItem>
<listItem name="Administrator tasks">
<href>/webaccess/iWACommandList</href>
</listItem>
<listItem name="Manage incoming items">
<href>/webaccess/iWAMyFolder</href>
</listItem>
<listItem name="Monitor jobs">
<href>/webaccess/iWAJobList?jobtype=user</href>
</listItem>
</homepage>
</profile>
</QiwaPolicies>
If you want links that only customers can access, add another profile section to the file.
Supported replacement tags
iSeries Access for Web supports a number of additional replacement tags in home page files:
%%TITLE%% is replaced with the page title.
%%USER%% is replaced with the authenticated user name.
%%SYSTEM%% is replaced with the name of the iSeries server being accessed.
%%VERSION%% is replaced with the version of iSeries Access for Web installed.
Update home page
This link exists as a design convenience and should be removed when the home page is
complete. When a new version of the home page is saved, this link provides a fast path to the
general customize page for updating the home page setting. Clicking OK takes you back to
the updated home page.
This link uses the %%USER%% replacement tag to update the home page file for the current
user. By using the replacement tag, this link can be used to test the customer view as well as
the administrator view. This assumes the customer user profile is enabled to update the home
page setting during the home page design phase.
The source for the link is:
<a href="/webaccess/iWACustomizeGeneral?profile=%%USER%%">Update home page</a>
Tip: You need to use character references for characters that can be included in an XML
document. For example, if you have a link with multiple parameters, you need to replace &
with &amp;.

Get iSeries Access for Web V5R2 and WebSphere Host Publisher V4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.