I’m trying to read an inputText which is placed in a p:notificationBar but I only get null as the input of it. The jsf code is :
<h:form>
<p:notificationBar position="top"
effect="slide"
styleClass="top"
id="notificationPanel"
widgetVar="bar" >
<h3>Subscribe</h3>
Add your email adress here
<h:panelGrid columns="3" cellspacing="20">
Email:
<p:inputText value="#{detailsBean.email}" />
<p:commandButton value="Submit" action="#{detailsBean.submitEmail}" onclick="bar.hide()"/>
</h:panelGrid>
</p:notificationBar>
</h:form>
The HTML representation of the
<p:notificationBar>will be relocated to the desired location in the HTML DOM tree and will in your particular case thus not end up in a HTML form anymore.You need to move the
<h:form>to inside the<p:notificationBar>.