if (!actionSet.isEmpty()) {
target.addVariable(this, "action", "");
target.startTag("actions");
final Iterator<Action> i = actionSet.iterator();
while (i.hasNext()) {
final Action a = i.next();
target.startTag("action");
if (a.getCaption() != null) {
target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION,
a.getCaption());
}
if (a.getIcon() != null) {
target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_ICON,
a.getIcon());
}
target.addAttribute("key", actionMapper.key(a));
target.endTag("action");
}
target.endTag("actions");