Request parameters and content examples for use in customizing user interface content

This section describes the request parameters that you can use in JSP files to customize content.


Request parameter values

To support dynamic content such as breadcrumbs, help links and user IDs, a few request parameters are available. The following table shows these properties, their possible values, and a description.

Property name Value Description
loggedIn true or false Flag that indicates whether the user is logged in.
usercn The common name of the owner of the logged in account This value is only set if the user is logged in.
langOrientation ltr or rtl Indicates the language direction of the current locale, either left to right, or right to left.
helpUrl /itim/self/Help.do?helpId=example_url URL to the help web page with the helpId parameter set for the current page.
helpLink Example: home_help_url The helpId for the current page. The value home_help_url maps to the corresponding key in the SelfServiceHelp.properties file.
breadcrumbs

example_message_key.

example_message_key.

example_message_key.

A list of message keys that correspond to entries in the SelfServiceScreenText.properties file.
breadcrumbLinks

pathname.

pathname.

empty_strin.

A list of links that is the same length as the breadcrumbs list.


Examples of request parameters in toolbar.jsp

The default file toolbar.jsp contains the logic to display the welcome message and help links. This logic can be moved into the other layout elements; for example, the welcome message might be provided in the banner.


Displaying the welcome message

The following code checks to see whether the user’s common name is set. If so, it translates the welcome message and substitutes the name into the message. The self-service user interface message labels and keys are defined in the SelfServiceScreenText.properties file.
<%-- If the Users Common Name is not empty display it. Note this value is not      set until the user is logged in --%> 

<c:if test=”${!empty usercn and loggedIn == true}”>
    <%--Translate the Welcome, Common Name message passing in the name --%>
    <fmt:message key=”toolbar_username” >    
        <fmt:param><c:out value=”${usercn}”/></fmt:param>
    </fmt:message>
</c:if>
</div>
<%-- end user info -- %>


Displaying help links

The following code adds the Help link to the page. The helpUrl is retrieved from help attributes, and the help label is translated for display.
<%-- Add Help Link to the page --%> 

<a id=”helpLink” href=”javascript:launchHelp(‘<c:out value=’${helpUrl}’)”>
      <fmt:message key=”toolbar_help”/></a>


Supporting logoff

The Logoff link can only be displayed if the user is logged in. The following code tests to see whether the loggedIn request parameter is true. If so, the code translates the label for the logoff link and includes the link in the page.
<%-- If the user is logged in display the logoff link --%> 
<c:if test=”${loggedIn == true}”>
   <a id=”logofflink” href=”/itim/self/Login/Logoff.do”>
       <fmt:message key=”toolbar_logoff”/></a>
</c:if>


Displaying breadcrumbs

The following code adds the breadcrumbs attribute to the page. The breadcrumbs attribute contains the list of label keys for the breadcrumbs attribute. The breadcrumbLinks contain URL information for each breadcrumb label. A value of null or empty for the breadcrumbLinks indicates that the breadcrumb is not linkable.
<%-- If the breadcrumbs label keys are not empty then display --%> 

<c:if test=”${!empty breadcrumbs}”> 
    <c:forEach items=”${breadcrumbs}” var=”breadcrumb” varStatus=”status”>

        <c:if test=”${status.index > 0}”>
            &nbsp;&gt;&nbsp;
        </c:if>

        <c:choose>
            <%-- If the action link is not empty for the current label then 
                 create a link for the breadcrumb --%> 

           <c:when test=”${!empty breadcrumbLinks{status.index}}”>
               <html:link action=”${breadcrumbLinks{status.index}}”>
               <fmt:message key=”${breadcrumb}”/></html:link>
           </c:when>
           <%-- If the action link is empty then just translate the 
                label for the breadcrumb --%> 
           <c:otherwise>
               <fmt:message key=”${breadcrumb}”/>
           </c:otherwise>
        <c:choose>

    </c:forEach>

</c:if>

Parent topic: Customize banner, footer, toolbar, and navigation bar content