I'm very new in using the Primefaces framework.
My problem is, that I want to call a bean method if the user clicks a button, but the method won't be triggered. Nevertheless, IntelliJ autocompletes the method and I use the bean as item source for another control, that works.
Parts of Index.htmlx
<h:form id="newLunch">
<h:panelGrid columns="2" style="width: 300px;">
<h:outputLabel for="initiator" value="Initiator" />
<p:inputText id="initiator" />
...
<p:button value="save" actionListener="#{indexBean.onSaveLunch}" />
</h:panelGrid>
</h:form>
IndexBean.java
@ManagedBean
@SessionScoped
public class IndexBean
{
public IndexBean()
{
//...
}
public void onSaveLunch()
{
// do some action, will not be triggered
}
}
Thanks for supporting a newbie!