In Jenkins, you can export arbitrary server-side Java object to JavaScript via a proxy,
then invoke their methods from JavaScript. See <a href="http://wiki.jenkins-ci.org/display/JENKINS/AJAX+with+JavaScript+proxy">the Wiki</a> for more details.
In this sample, we call a method on the server to increment a counter. This object is a singleton,
so you'll see the same counter value across all the browsers.
blurb=<p>Jenkins consists of a large and complex graph of domain objects (<tt>ModelObject</tt>), where each node in the graph is a web page and edges are hyperlinks. \
To help users navigate quickly on this graph, Jenkins provides a mechanism to attach context menus to model objects, \
which can be used to hop multiple edges without going through individual hyperlinks.
blurb.define=<p>To define a context menu on <tt>ModelObject</tt>, implement <a href="http://javadoc.jenkins-ci.org/byShortName/ModelObjectWithContextMenu"><tt>ModelObjectWithContextMenu</tt></a>. \
See <a href="sourceFile/NavigationContextMenu.java">the example</a> for how to implement this method.
blurb.breadcrumb=<p>Implementing <tt>ModelObjectWithContextMenu</tt> is sufficient for the core to show the context menu \
for your model object in the breadcrumb. Hover your mouse over the breadcrumb of this page to see context menu \
blurb=<p>Notification bar shows a message that disappears in a few seconds. \
It is typically used to provide feedback for asynchronous operations.
blurb.hide=<p>A notification bar will auto-hide itself, but you can programmatically hide it via <tt>notificationBar.hide()</tt>
blurb.stock=<p>For typical notifications, there are several pre-defined option set available as constants that you can use as <tt>notificationBar.show(msg,notificationBar.OK)</tt>