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.
So...
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:
<bean class="org.opennms.web.navigate.LocationBasedNavBarEntry">
<property name="name" value="Node Report"/>
<property name="url"
value="element/nodeReport.htm?listInterfaces=true"/>
<property name="locationMatch" value="nodereport"/>
</bean>
and
<bean name="/element/nodeReport.htm"
class="org.opennms.web.controller.node.NodeListController">
<property name="commandName">
<value>command</value>
</property>
<property name="commandClass">
<value>org.opennms.web.command.NodeListCommand</value>
</property>
<property name="successView">
<value>element/nodeReport</value>
</property>
<property name="nodeListService" ref="nodeListService"/>
</bean>
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.
-Jerome
________________________________
From: [email protected] [[email protected]]
Sent: Wednesday, February 13, 2013 6:02 AM
To: [email protected]
Subject: [opennms-devel] Adding new menu item
Dear Sir,
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?
Regards,
====================
Mani Mathur
मनि माथुर
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 [email protected]
***NTPC Ltd******** End of Disclaimer
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-devel mailing list
To *unsubscribe* or change your subscription options, see the bottom of this
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel