I'm using the computed navigator to provide access to a set of views. Each view lists a different document type. In most cases documents are opened via ajax. In this case, when viewing a document, the navigator still shows the relevant entry highlighted.
There is one exception where documents are opened from a view using a full page load so that the tabbed footer can be used, just for that document type. In this case the navigator does not show a highlighted entry and this looks a bit inconsistent.
To workaround this I added an extra property to one menu item on the navigator 'state: Active' and altered the custom control to check for this when computing the style class on all 3 levels of menu item, e.g.
I'm using the computed navigator to provide access to a set of views. Each view lists a different document type. In most cases documents are opened via ajax. In this case, when viewing a document, the navigator still shows the relevant entry highlighted.
There is one exception where documents are opened from a view using a full page load so that the tabbed footer can be used, just for that document type. In this case the navigator does not show a highlighted entry and this looks a bit inconsistent.
To workaround this I added an extra property to one menu item on the navigator 'state: Active' and altered the custom control to check for this when computing the style class on all 3 levels of menu item, e.g.
xp:this.styleClass<![CDATA[#{javascript:if (("/" + getCurrentXPage()) == menuItem.page || menuItem.state == "Active"){ return "topopen active"; }}]]>/xp:this.styleClass
Is there a better way to achieve this?