What is difference between when setting the global
attribute of <p:commandButton>
to false
or setting it to true
. I was going through the primefaces showcase but couldn't understand the difference.
CommandButton AttributesIt is used to specify the rendering of the component. It is used to set label for the button. It is used to set action when button is clicked. It is used to set actionlistener that'd be processed when button is clicked.
PrimeFaces provides a partial page rendering (PPR) and view-processing feature based on standard JSF 2 APIs to enable choosing what to process in the JSF lifecycle and what to render in the end with AJAX. PrimeFaces AJAX Framework is based on standard server-side APIs of JSF 2.
Form the Primefaces TLD:
Defines whether to trigger ajaxStatus or not.
If global
is true and you defined ajaxStatus
on your page, then the status is shown if you click the button.
In easy words, if you don't want the "processing" dialog to be shown, set global to false. By default, this field is set to true, so it will always show you that "loading" dialog (also called ajaxStatus)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With