IBM R1 manual It then checks to see if its a text box type field

Page 47

key from the appropriate .properties file. Similarly, the “tooltipKey” attribute defines the resource key to retrieve for display in the window status bar when the button is moused over to define the action the button performs. The “href” attribute defines the action to perform when the button is clicked. This href calls the customFieldsPopup() function, which is Javascript code that is defined in the page header. Setting the “secondary” attribute to true diminishes the visibility of the button by changing it to a duller color:

<lms:button captionKey="button.edit" tooltipKey="button.alt.manageCustomProperties" href="javascript:customFieldsPopup();" secondary="true"/>

The last section of code displays a list of any existing custom fields stored in the application.

This piece of code iterates over the customField objects in the CustomFieldHelper class which accesses the previously created custom fields:

<logic:iterate id="customField" name="<%= formName %>" property="customFields"

type="com.lotus.elearn.model.CustomFieldHelper">

This code retrieves from each returned custom field a value to use for the label:

<lms:label beanClass="com.lotus.elearn.model.CustomFieldHelper"

instance="<%=customField%>"

id="<%=customField.getValidationLabelId(cfName)%>"> <lms:staticText name="customField" property="name" /> </lms:label>

It then checks to see if it's a text box type field:

<logic:equal name="customField" property="type" value="<%=Integer.toString(CustomFieldConst.TYPE_TEXTBOX)%>">

or a drop down box type field:

<logic:equal name="customField" property="type" value="<%=Integer.toString(CustomFieldConst.TYPE_DROP_DOWN)%>">

This code, which follows the check for a text box field, defines how to display the content of the textbox field, if present, or the default value for the text box field, if available, or an empty text box field, if no other value is supplied:

<%-- if a value for this entry is present, display that --%> <logic:present name="customField" property="val">

<input type="text" size="20" name="<%=cfName%>" value="<%=customField.getVal()%>"/>

</logic:present>

<%-- if a value for this entry is NOT present, display the default or a blank

%>

<logic:notPresent name="customField" property="val">

<%-- default value if present --%>

<logic:present name="customField" property="defaultValue"> <input type="text" size="20" name="<%=cfName%>" value="<%=customField.getDefaultValue()%>"/> </logic:present>

<%-- blank --%>

<logic:notPresent name="customField" property="defaultValue"> <input type="text" name="<%=cfName%>" size="20" value=""/>

42 IBM Lotus Learning Management System Release 1 Customization Guide

Image 47
Contents Customization Guide List of Trademarks DisclaimerLicensed Materials Property of IBM Page Table of Contents Index Customization setsCreating a tab Customizing the user interface Acronyms and abbreviations Disclaimer and a word about conventionsAcronym or What it stands for Abbreviation Page Changing settings Chapter Changing settings through the user interface or XMLPage To add a role to the system Chapter Controlling access to features through permissionsTo explicitly assign a role to a user To modify permissions settings for an existing roleTo assign a role to a user To automatically assign a role to a userControlling access to features Page Anatomy of a Help topic Chapter Customizing HelpScript Background-repeat repeat-x Mosaic-bgScript Head Lmsform action=/prefSubmit.do % Editing an existing Help topicReplacing a context-sensitive Help topic Adding your own Help topic HREF=shenrolled.html target=topEnrolled courses/Abr HREF=shnotifications.html target=topNotifications/AbrOverview Chapter Customizing JavaServer PagesServerNameWEB-INFtld Anatomy of a TLD fileLMS JSP tag libraries Defining the url tag in the TLD file Referencing the url tag in a JSPString formName = request.getParameterformName ServerNameWEB-INFclassescomlotuselearntaglib Rtexprvaluetrue/rtexprvalue Attribute TagDefining a page as a JSP Learning Management System serverAnatomy of a JSP Referencing Struts tags Localizing page contentIncluding tag library descriptor files Including the JSPs that comprise the main template Including JavaScript source codeDiv Td class=formBoxTitleBg colspan=3 valign=middle nowrapLogicnotPresent LogicnotMatch Div class=formBoxPositionInnerLogicpresent LogicnotPresent logicpresent name=invalidFormLocalizing page text Delivery serverPopulating a frameset in a JSP Displaying errors to the userScript language=JavaScript src=js/delivery.js/script Defining resizable frames Frameset Html Making global changesChanging the application style Applying customization setsBrowser-version Editing existing CSS filesServerNamecsslanguageCodebrowserType Language-version@import urlmyStyles.css Adding your own CSS filesReplacing CSS files Changing the font size or font style of the applicationServerNameWEB-INFclassesresourcesserverNameproperties Updating page textLmslinklmsimg src=images/name.gif… //lmslink Titlelmsmessage key=application.title //titleApplication.title = IBM Lotus Learning Management System Adding and replacing graphicsDelivery server Replacing the application logoLearning Management System server Image.alt.logo = IBM Lotus Learning Management SystemChanging the style of an individual JSP Changing individual JSPsReplacing a reference to a CSS style DeliverylogoURL resource=images/myCompanyLogo.gifSpecifying the next page to display Editing existing JSP tagsChanging the functionality of an individual JSP Editing form Bean values with the lmshidden tag Canceling the submission of a formSubmitting a form Custom fields Removing JSP tagsLmshidden name=%=formName% property=unmodifiedKeywords Lmshidden property=userEventIt then checks to see if its a text box type field LogicnotPresent Logicequal Page Attribute name=HealthPlanChoice type=java.lang.String Chapter Customizing SearchCustomizing user searches Adding Ldap attributes to User Search pagesRemoving fields from User Search pages HealthPlanChoice = Employees Health PlanRemoving fields from Offerings Search pages Customizing Offerings Catalog searchesCustomizing course management and resource searches Adding custom fields to the Offerings CatalogRemoving fields from the Search pages Creating a customization set Chapter Customization setsLMM De en Etc De en etc. SalesCSPage Attribute Name Type Modified Size Path Customization sets Page Users Chapter Creating a tab@ taglib uri=/WEB-INF/tld/lms.tld prefix=lms % Users.jspTd width=1 valign=top Page Users.rosterUsers.subtitle = Roster Users Navigation.xml Users.rosterUsers.search.confirm Users.rosterUsers.searchTrail TrailManageUsers TrailTrail TrailManageRoles Trail TrailManageProfilesLabel tag breadcrumbs Content tag JSP file namesName tag page names and resourced text Target tag struts action-mappingUsers.rosterUsers.search.confirm HelpPage tag context-sensitive Help Adding custom permissionsTitle tag title bar text Permissions tag permission to displayPermid UpdatetimeOid Name0000000000000000PERM 0000000000003000PERM 0000000000009300PERM Copy the JSPs ExamplePage Creating a tab END Index Content Area Creating a tab Div Second linked page customGoodbye.jsp looks like this Page Create Help files Customtab.htmlCustomtabb.html Select Maxpermid from Permission Add permissions to the LMS databaseEdit ApplicationResources.properties Navigation Edit navigation.xmlAssign permissions Namestudenthome/nameCreating a tab Page Index