// lookup the data element [/ROLLUP_ID/Rollup Instance
// List]. If it is missing or if it contains less than two
// items, return an empty fragment (and save the empty
// fragment to the cache).
String instanceListName = rollupInstanceList(rollupID);
ListData instanceList = getList(data, instanceListName);
if (instanceList == null || instanceList.size() < 2)
return CACHE.put(rollupID, "");
// Construct an HTML fragment
String prompt = resources.format("Rollup_Select_Prompt_FMT", rollupID);
StringBuffer result = new StringBuffer();
result.append("<tr><td>").append(HTMLUtils.escapeEntities(prompt))
.append(" </td>\n <td colspan=10><select name='[")
.append(rollupPrefix(rollupID)).append("]s'>");
for (int i = 0; i < instanceList.size(); i++) {
String opt = HTMLUtils.escapeEntities((String) instanceList.get(i));
result.append("\n<option value=\"").append(opt).append("\">")
.append(opt);
}
result.append("\n</select></td></tr>\n");
return CACHE.put(rollupID, result.toString());