I am trying to add a button using primefaces to a JFS page, and upon clicking it a method from a Java class should be called:
<p:commandButton type="submit"
value="Test - Print Message"
action="#{DataForm.Preference}" />
I get the primefaces button (the nice GUI), but when I click on the button the code from the java class DataForm.Preference
is not executed.
I have used the attribute action
in my code, and I don't think primefaces recognizes it, how should I call the method Preference
from my DataForm
class?