Here you can find the source of getScreen_BL_NONNULL(List
private static String getScreen_BL_NONNULL(List<Object> searchableFields)
//package com.java2s; /*L/*w w w.j a va 2 s. c o m*/ * Copyright Ekagra Software Technologies Ltd. * Copyright SAIC, SAIC-Frederick * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cacore-sdk/LICENSE.txt for details. */ import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { private static String booleanSelect = null; private static List<String> booleanOptions = new ArrayList<String>( Arrays.asList("", "True (Yes)", "False (No)")); private static List<String> booleanValues = new ArrayList<String>(Arrays.asList("", "true", "false")); private static String getScreen_BL_NONNULL(List<Object> searchableFields) { return getHTML_BL(searchableFields); } private static String getHTML_BL(List<Object> searchableFields) { if (searchableFields.contains("value")) { StringBuilder sb = new StringBuilder(); sb.append("<tr>"); sb.append(" <td class=\"isoFormLabel\">Value:</td>"); sb.append(" <td class=\"isoFormField\">").append(getSelect_Boolean("value")).append("</td>"); sb.append("</tr>"); return sb.toString(); } return ""; } private static String getSelect_Boolean(String attrName) { StringBuilder sb = new StringBuilder("<select name=\"").append(attrName).append("\" id=\"").append(attrName) .append("\" class=\"formFieldSized\">"); if (booleanSelect == null) { // lazy initialize StringBuilder tempSb = new StringBuilder(); int size = booleanOptions.size(); for (int i = 0; i < size; i++) { tempSb.append("<option value=\"").append(booleanValues.get(i)).append("\">") .append(booleanOptions.get(i)).append("</option>"); } tempSb.append("</select>"); booleanSelect = tempSb.toString(); } return sb.append(booleanSelect).toString(); } private static String getSelect_Boolean(String attrName, String value) { StringBuilder sb = new StringBuilder("<select name=\"").append(attrName).append("\" id=\"").append(attrName) .append("\" class=\"formFieldSized\">"); //if (booleanSelect == null){ // lazy initialize StringBuilder tempSb = new StringBuilder(); int size = booleanOptions.size(); for (int i = 0; i < size; i++) { String selected = ""; if (value != null && value.equals(booleanValues.get(i))) selected = "selected=\"selected\""; tempSb.append("<option " + selected + "value=\"").append(booleanValues.get(i)).append("\">") .append(booleanOptions.get(i)).append("</option>"); } tempSb.append("</select>"); booleanSelect = tempSb.toString(); //} return sb.append(booleanSelect).toString(); } }