I have a notifictionBar on my application and I don't just want to "hide" it after close icon pressed where the hide happens on client side. My aim is to not render it again.
so I have below code. My expectation is that the "update" property of commandLink should rerender the entire notification component where it will be unrendered. As this is written here, I failed :)
Can someone help please ?
<h:form id="announcement-form">
<p:notificationBar id="id-announcement"
position="top" effect="slide"
autoDisplay="true" styleClass="top"
widgetVar="announcement"
rendered="#{announcementSupport.shouldDisplayAnnouncement()}">
<p:commandLink title="Close" class="ui-notificationbar-close"
action="#{announcementSupport.announcementClosed}"
update=":announcement-form:id-announcement">
<i class="fa fa-times fa-2x" />
</p:commandLink>
<div class="announcement">
<div class="logo">
</div>
<div class="content">
<div class="title">
<h:outputText value="#{messages['main.announcement.title']}"/>
</div>
<div class="body">
<h:outputText value="#{announcementSupport.announcement}"/>
</div>
</div>
</div>
</p:notificationBar>
</h:form>