ucRenderListValues
Purpose
ucRenderListValues allows any list, popup, or tab display to be modified by changing or replacing the ValidationList.
Applies To
Field Rendering Methods
Signature
public void ucRenderListValues (
SesameSession session, // current session.
ValidationList selList, // the items to display in the list or popup
String pGlobal, // ddname
HashMap selectedVals, // values selected in the list.
HashMap attributes) // attributes of the list. EG size.
Notes
Change the ValidationList to do this. The validation list is a Hashtable, and the internal value and display title pairs used to construct the html input control. The key is the udfList ID and the value is the Name that appears in the list. Do not use .clear() to clear the contents. Make a clone and use this to iterate through and remove elements from the bottom up.
Example
public void ucRenderListValues(
SesameSession session, // current session
ValidationList selList, // the items to be displayed in the list/popup
String ddName, // ddname
HashMap selectedVals, // values that are selected in the list
HashMap attributes) { // attributes of the list. EG size
if ("CATEGORY_SELECTOR".equals(ddName)) {
String layoutType = (String) session.getAttribute("LAYOUT_TYPE");
if (!TextManager.isStringInvisible(layoutType)
&& layoutType.startsWith("ADD")
&& selList != null) {
selList.remove(UL_CATEGORY_SELECTOR_CAPA);
selList.remove(UL_CATEGORY_SELECTOR_REG_SUB);
selList.remove(UL_CATEGORY_SELECTOR_GROUP);
selList.remove(UL_CATEGORY_SELECTOR_HISTORY);
}
}
}