if (role != null && ! UserTools.currentUserIsInGroup(request, role))
{
continue;
}
CommandInfo cmdInfo = new CommandInfo(aCommandConfig.getAttribute("model"), aCommandConfig
.getAttribute("id"), aCommandConfig.getAttribute("label"), aCommandConfig.getAttribute(
"icon", null));
cmdInfo.setBundle(aCommandConfig.getAttribute("bundle", "Aktera"));
Configuration[] params = aCommandConfig.getChildren("param");
setParameters(cmdInfo, params);
cmdDescriptor.add(cmdInfo);
}
listing.setListCommands(cmdDescriptor);
}
if (! overview && itemCommandConfig.size() > 0)
{
CommandDescriptor cmdDescriptor = new CommandDescriptor("selectedItems");
for (Iterator i = itemCommandConfig.iterator(); i.hasNext();)
{
Configuration aItemCommandConfig = (Configuration) i.next();
if (! NumberTools.toBool(aItemCommandConfig.getAttribute("visible", "true"), true))
{
continue;
}
if (cmdDescriptor.hasCommand(aItemCommandConfig.getAttribute("id")))
{
continue;
}
CommandInfo cmdInfo = new CommandInfo(aItemCommandConfig.getAttribute("model", aItemCommandConfig
.getAttribute("bean", null)), aItemCommandConfig.getAttribute("id"), aItemCommandConfig
.getAttribute("label"), aItemCommandConfig.getAttribute("icon", null));
cmdInfo.setStyle(aItemCommandConfig.getAttribute("style", null));
cmdInfo.setBundle(aItemCommandConfig.getAttribute("bundle", "Aktera"));
if (aItemCommandConfig.getAttribute("bean", null) != null)
{
cmdInfo.setBean(true);
}
Configuration[] params = aItemCommandConfig.getChildren("param");
setParameters(cmdInfo, params);