IBM R1 manual Updating page text, ServerNameWEB-INFclassesresourcesserverNameproperties

Page 40

To increase the default font size, change the “font-size:” value from xx-small to small or medium. To change the font style, replace the values in the “font-family:” setting with the fonts you want the application to use.

Several of the classes in the CSS specify specific font sizes and styles that you have to change individually. These include the SPAN.hdrGeneral, DIV.hdrMainItem001, TD.hdrFolderDetails, and many other classes. If you want to change the font size of an item that has a class style assigned to it, search the CSS files for the class name to see if a specific font size has been assigned to that item and change it in the class definition of the CSS file.

Updating page text

The power of a JSP lies in its ability to supply dynamic content. The LMS application takes advantage of this ability by resourcing much of the text on the pages of the application in properties files (which are files named with a .properties extension). Instead of placing static text in the source HTML for the page, you can reference a resource key in a .properties file that contains the translated value. You can then set up the application to retrieve different .properties files based on the locale of the browser or user preferences. This way, you can cater the text to specific user types. Storing text strings in .properties files is especially useful for maintaining multiple language applications.

The LMS application uses .properties files to define static text for errors and resources in each of the servers hosting the application. The .properties files are stored in the following directory:

[serverName]>WEB-INF>classes>resources>[serverName]>properties

where [serverName] equals one of the following:

lmm: Represents the Learning Management System server.

ds: Represents the Delivery Server.

duc: Represents the Offline Learning Client server.

Each properties directory contains the following two .properties files:

ApplicationErrors.properties: Contains the resource keys for error messages.

ApplicationResources.properties: Contains the resource keys for application resources.

A set of these files is available for each language supported by the application. The language of the .properties file is specified by an underscore followed by the language code after the file name. For example, the German ApplicationErrors .properties file is named ApplicationErrors_de.properties. This naming convention is followed for all the .properties files, except the English-language version .properties files, which are the default .properties files for the application. The English-language .properties files have no underscore and language code following the file names.

The .properties files in the IBM Lotus LMS application are located in the directories listed in the table below. The files listed are English-version files, so there are no language codes attached to the file names.

IBM Lotus Learning Management System application properties files

Server Name

Directory

English-Language .properties Files

Learning

WEB-

ApplicationErrors.properties

Management System

INF>classes>resources>lmm>properties

ApplicationResources.properties

Delivery

WEB-

ApplicationErrors.properties

 

INF>classes>resources>ds>properties

ApplicationResources.properties

Offline Learning

WEB-

ApplicationErrors.properties

Client

INF>classes>resources>duc>properties

ApplicationResources.properties

Chapter 5: Customizing JavaServer Pages 35

Image 40
Contents Customization Guide Licensed Materials Property of IBM DisclaimerList of Trademarks Page Table of Contents Creating a tab Customization setsIndex Customizing the user interface Disclaimer and a word about conventions Acronyms and abbreviationsAcronym or What it stands for Abbreviation Page Chapter Changing settings through the user interface or XML Changing settingsPage Chapter Controlling access to features through permissions To add a role to the systemTo modify permissions settings for an existing role To assign a role to a userTo automatically assign a role to a user To explicitly assign a role to a userControlling access to features Page Chapter Customizing Help Anatomy of a Help topicScript Mosaic-bg Background-repeat repeat-xScript Head Replacing a context-sensitive Help topic Editing an existing Help topicLmsform action=/prefSubmit.do % Adding your own Help topic HREF=shnotifications.html target=topNotifications/Abr HREF=shenrolled.html target=topEnrolled courses/AbrChapter Customizing JavaServer Pages OverviewLMS JSP tag libraries Anatomy of a TLD fileServerNameWEB-INFtld String formName = request.getParameterformName Referencing the url tag in a JSPDefining the url tag in the TLD file Rtexprvaluetrue/rtexprvalue Attribute Tag ServerNameWEB-INFclassescomlotuselearntaglibAnatomy of a JSP Learning Management System serverDefining a page as a JSP Including tag library descriptor files Localizing page contentReferencing Struts tags Including JavaScript source code Including the JSPs that comprise the main templateTd class=formBoxTitleBg colspan=3 valign=middle nowrap LogicnotPresent LogicnotMatchDiv class=formBoxPositionInner DivLogicnotPresent logicpresent name=invalidForm LogicpresentDelivery server Localizing page textScript language=JavaScript src=js/delivery.js/script Displaying errors to the userPopulating a frameset in a JSP Defining resizable frames Making global changes Frameset HtmlApplying customization sets Changing the application styleEditing existing CSS files ServerNamecsslanguageCodebrowserTypeLanguage-version Browser-versionAdding your own CSS files Replacing CSS filesChanging the font size or font style of the application @import urlmyStyles.cssUpdating page text ServerNameWEB-INFclassesresourcesserverNamepropertiesTitlelmsmessage key=application.title //title Application.title = IBM Lotus Learning Management SystemAdding and replacing graphics Lmslinklmsimg src=images/name.gif… //lmslinkReplacing the application logo Learning Management System serverImage.alt.logo = IBM Lotus Learning Management System Delivery serverChanging individual JSPs Replacing a reference to a CSS styleDeliverylogoURL resource=images/myCompanyLogo.gif Changing the style of an individual JSPChanging the functionality of an individual JSP Editing existing JSP tagsSpecifying the next page to display Submitting a form Canceling the submission of a formEditing form Bean values with the lmshidden tag Removing JSP tags Lmshidden name=%=formName% property=unmodifiedKeywordsLmshidden property=userEvent Custom fieldsIt then checks to see if its a text box type field LogicnotPresent Logicequal Page Chapter Customizing Search Customizing user searchesAdding Ldap attributes to User Search pages Attribute name=HealthPlanChoice type=java.lang.StringHealthPlanChoice = Employees Health Plan Removing fields from User Search pagesCustomizing Offerings Catalog searches Customizing course management and resource searchesAdding custom fields to the Offerings Catalog Removing fields from Offerings Search pagesRemoving fields from the Search pages Chapter Customization sets Creating a customization setLMM De en etc. SalesCS De en EtcPage Attribute Name Type Modified Size Path Customization sets Page Chapter Creating a tab UsersUsers.jsp @ taglib uri=/WEB-INF/tld/lms.tld prefix=lms %Td width=1 valign=top Page Users.rosterUsers.subtitle = Roster Users Navigation.xml Users.rosterUsers.search Users.rosterUsers.search.confirmTrail Trail TrailManageRolesTrail TrailManageProfiles Trail TrailManageUsersContent tag JSP file names Name tag page names and resourced textTarget tag struts action-mapping Label tag breadcrumbsUsers.rosterUsers.search.confirm Adding custom permissions Title tag title bar textPermissions tag permission to display HelpPage tag context-sensitive HelpUpdatetime OidName Permid0000000000000000PERM 0000000000003000PERM 0000000000009300PERM Example Copy the JSPsPage Creating a tab END Index Content Area Creating a tab Div Second linked page customGoodbye.jsp looks like this Page Customtab.html Create Help filesCustomtabb.html Add permissions to the LMS database Select Maxpermid from PermissionEdit ApplicationResources.properties Edit navigation.xml NavigationNamestudenthome/name Assign permissionsCreating a tab Page Index