});
tasksEntry.setCount(tasksCount);
// Queued
List<Group> groups = identityService.createGroupQuery().groupMember(user.getId()).list();
ToolbarPopupEntry queuedItem = addPopupEntry(ENTRY_QUEUED, (i18nManager.getMessage(Messages.TASK_MENU_QUEUED)));
long queuedCount = 0;
for (final Group group : groups) {
if (group.getType().equals("assignment")) {
long groupCount = new QueuedListQuery(group.getId()).size();
queuedItem.addMenuItem(group.getName() + " (" + groupCount + ")", new ToolbarCommand() {
public void toolBarItemSelected() {
viewManager.showQueuedPage(group.getId());
}
});
queuedCount += groupCount;
}
}
queuedItem.setCount(queuedCount);
// Involved
long involvedCount = new InvolvedListQuery().size();
ToolbarEntry involvedEntry = addToolbarEntry(ENTRY_INVOLVED, i18nManager.getMessage(Messages.TASK_MENU_INVOLVED), new ToolbarCommand() {
public void toolBarItemSelected() {