@HandlerInput(name="dropDownComponent", type=com.sun.webui.jsf.component.DropDown.class, required=true),
@HandlerInput(name="poolMap", type=java.util.Map.class)
}
)
public static void setConnectionDefDropdown(HandlerContext handlerCtx) {
DropDown dp = (DropDown)handlerCtx.getInputValue("dropDownComponent");
Map poolMap = (Map)handlerCtx.getInputValue("poolMap");
String resAdapter = (String) poolMap.get("resAdapter");
if (GuiUtil.isEmpty(resAdapter)){
return;
}
Object[] params = {resAdapter};
String[] types = {"java.lang.String"};
String[] connectionDefinitions = (String[])JMXUtil.invoke(
"com.sun.appserv:type=resources,category=config",
"getConnectionDefinitionNames", params, types );
if (connectionDefinitions == null)
return;
ArrayList list = new ArrayList();
for(int i=0; i<connectionDefinitions.length; i++)
{
list.add(new Option(connectionDefinitions[i], connectionDefinitions[i]));
}
dp.setItems(list);
}