User's Manual
Table Of Contents
- Customization Guide
- Table of Contents
- Chapter 1: Customizing the IBM Lotus Learning Management System User interface
- Chapter 2: Changing settings through the user interface or XML
- Chapter 3: Controlling access to features through permissions
- Chapter 4: Customizing Help
- Chapter 5: Customizing JavaServer Pages
- Chapter 6: Customizing Search
- Chapter 7: Customization sets
- Chapter 8: Creating a tab
- Index
</logic:notPresent>
</logic:notPresent>
</logic:equal>
This code, which follows the check for drop-down box field, defines how to display the content of
the drop-down box field, if present. Displaying the content of the drop down box requires
denoting which of the available options is selected. If no option is selected, displays the default
value as the selected option:
<%-- ========== --%>
<%-- select box --%>
<%-- ========== --%>
<logic:equal name="customField" property="type"
value="<%=Integer.toString(CustomFieldConst.TYPE_DROP_DOWN)%>">
<select name="<%=cfName%>" id="<%=customField.getName()%>">
<%-- iterate over the options --%>
<logic:iterate id="optionValue" name="customField"
property="optionValues"
type="java.lang.String">
<%
//-- if the entry has a value, make it selected. --//
if ( null != customField.getVal() ) {
if ( optionValue.equals(customField.getVal()) ) {
%>
<option value="<%=optionValue%>"
selected><%=optionValue%></option>
<%
} else {
%>
<option value="<%=optionValue%>"><%=optionValue%></option>
<%
}
//-- the entry has no default, make the default option selected.
--//
} else {
if ( optionValue.equals(customField.getDefaultValue()) ) {
%>
<option value="<%=optionValue%>"
selected><%=optionValue%></option>
<%
} else {
Chapter 5: Customizing JavaServer Pages 43