ItEr16S09RFComportamentoGraficoPlanificadorItEr15S12: Mainmenu selected tab is now highlighted

This commit is contained in:
Lorenzo Tilve 2009-07-10 21:08:26 +02:00 committed by Javier Moran Rua
parent 7643e3ff98
commit 6620329c55
2 changed files with 13 additions and 3 deletions

View file

@ -49,6 +49,15 @@ public class CustomMenuController extends Div {
this.children.add(newChildren);
}
public boolean getActiveParent() {
String requestPath = Executions.getCurrent().getDesktop()
.getRequestPath();
if (requestPath.contains(url) || url.contains(requestPath)) {
return true;
}
return false;
}
}
public CustomMenuController() {
@ -60,13 +69,13 @@ public class CustomMenuController extends Div {
CustomMenuItem ci;
ci = new CustomMenuItem("mainmenu.plannification",
"/navalplanner-webapp/");
"/navalplanner-webapp/planner/main.zul");
ci.appendChildren(new CustomMenuItem("mainmenu.plannification",
"/navalplanner-webapp/planner/main.zul"));
ci.appendChildren(new CustomMenuItem("mainmenu.company_overview",
"/navalplanner-webapp/planner/main.zul"));
ci.appendChildren(new CustomMenuItem("mainmenu.plannifications_list",
"/navalplanner-webapp/planner/main.zul"));
"/navalplanner-webapp/planner/main.zul"));
l.add(ci);
ci = new CustomMenuItem("mainmenu.resources",

View file

@ -3,7 +3,8 @@
<n:table border="0" cellspacing="0" cellpadding="0">
<n:tr>
<n:td forEach="${menuContainer.customMenuItems}">
<n:a href="${each.url}" class="menuup">${c:l(each.name)}</n:a>
<n:a href="${each.url}" class=
"menuup${(each.activeParent?'_activa':'')}">${c:l(each.name)}</n:a>
</n:td>
</n:tr>
</n:table>