top.xhtml
Agregar dropMenu con <p:growl>, y <p:remmoteCommand> y un binding a
#{jmoordbNotificationsController.count}
<b:dropMenu id="dropMenuTop" class="badge badge-pill badge-danger" value="#{jmoordbNotificationsController.count}" iconAwesome="fa-bell-o" iconAlign="right">
<b:navLink value="#{app['label.youhave']} #{jmoordbNotificationsController.count} #{app['label.notification']}" href="#"></b:navLink>
<b:navLink value="#{app['menu.viewnotification']}" outcome="/pages/notifications/list" iconAwesome="fa-bell-o" />
<p:growl id="growl_top" globalOnly="true" life="5000" showDetail="true" />
<h:form id="topForm">
<p:remoteCommand
name="remoteCommandTop"
update=":growl_top :dropMenuTop"
actionListener="#{jmoordbNotificationsController.actionWebSocket()}"
process="@all">
</p:remoteCommand>
</h:form>
</b:dropMenu>
Last updated