LIElementTag liElement = null;
LinkElementTag linkElement = null;
String cssClass = _BLANK_CSS;
AbstractHtmlElementTag childElement = null;
int nodeCount = 0;
Task lastNode = null;
List<Task> nodeTasks = new ArrayList<Task>(3);
for (Task m : tasks) {
if (lastNode == null) {
lastNode = m;
}
if (!lastNode.getNode().equals(m.getNode())) {
liElement = new LIElementTag();
linkElement = new LinkElementTag();
linkElement.setHref(StringUtil.isEmpty(lastNode.getUrl()) ? _CURRENT_PAGE_HREF : lastNode.getUrl());
linkElement.setValue(lastNode.getDisplay() + _CONTENT_HINT_FONT + nodeCount + _CONTENT_HINT_FOOT);
linkElement.setCssClass(cssClass);
liElement.addChildrenTag(linkElement);
childElement = this.createTasksTag(nodeTasks);
if (childElement != null) {
liElement.addChildrenTag(childElement);
}
ulElement.addChildrenTag(liElement);
nodeCount = 0;
nodeTasks.clear();
lastNode = m;
}
nodeCount++;
nodeTasks.add(m);
}
if (lastNode != null) {
liElement = new LIElementTag();
linkElement = new LinkElementTag();
linkElement.setHref(StringUtil.isEmpty(lastNode.getUrl()) ? _CURRENT_PAGE_HREF : lastNode.getUrl());
linkElement.setValue(lastNode.getDisplay() + _CONTENT_HINT_FONT + nodeCount + _CONTENT_HINT_FOOT);
linkElement.setCssClass(cssClass);
liElement.addChildrenTag(linkElement);
childElement = this.createTasksTag(nodeTasks);
if (childElement != null) {
liElement.addChildrenTag(childElement);