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?
I don't think "preference" is your method Name. Seems like its a property. Why is your value static? What's the point of then using an action method?
精彩评论