This method can be used to remove the None or Any items dynamically, for the select list that is generated. Note that the values can be removed permanently from lists with layout cell attributes in the web-based layout editor.
Field Rendering Methods
public void ucRenderListOptions (
HashMap results, // hashmap of boolean add and none values
String fieldName ) // the name of the field on the
// form (eg p_name)
The session object is not passed in. It can be referenced using – SesameSession s = SesameSession.getSession(); To get the ddname of the fieldName use – TextManager.getGlobalName(fieldName;
public void ucRenderListOptions (
HashMap results, // hashmap of boolean add and none values
String ddName ) { // the name of the field on the form (eg p_name)
if ("duplicate_bugs".equalsIgnoreCase(ddName) ) {
results.put("addNone", new Boolean(false));
results.put("addAny", new Boolean(false));
}
}