navBar.jsp uses model.entries. This is set up in NavBarController.java (configured in ./WEB-INF/dispatcher-servlet.xml). This in turn references navBarItems which is configured in dispatcher-servlet.xml.
You can add a menu item in /opt/opennms/jetty-webapps/opennms/WEB-INF/dispatcher-servlet.xml, in the bean navBar.htm, the navBarItems list. But there would have to be an existing controller you can use, or you will have to write a controller.
For example, I added the following:
<property name="name" value="Node Report"/>
<property name="url" value="element/nodeReport.htm?listInterfaces=true"/>
<property name="locationMatch" value="nodereport"/>
<bean name="/element/nodeReport.htm" class="org.opennms.web.controller.node.NodeListController">
<property name="nodeListService" ref="nodeListService"/>
In my case, the data was already set up by an existing controller and I just needed to set it up to use my JSP for presentation.
From: manimathur@... [manimathur@...]
Sent: Wednesday, February 13, 2013 6:02 AM
Subject: [opennms-devel] Adding new menu item
I need to add to menu and create one click report - how to add new item in the navBar.jsp page.
Is there any track of ip conflicts-alarms on that side?
Manager - I.T.
प्रबन्धक ( सू. प्रौ.)
NTPC Limited, NRHQ Lucknow
उ क्षे मुख्यालय, लखनऊ
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient,please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. NTPC Ltd. has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. NTPC Ltd reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the NTPC Ltd e-mail system. If you have received this email in error, please notify to mailadmin@...
***NTPC Ltd******** End of Disclaimer