Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does <p:commandButton global="false"> attribute do?

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.

like image 702
Wizard Sultan Avatar asked Mar 29 '13 18:03

Wizard Sultan


People also ask

What are attributes of command button?

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.

What is process in PrimeFaces?

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.


2 Answers

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.

like image 177
Matt Handy Avatar answered Nov 15 '22 08:11

Matt Handy


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)

like image 34
Saurabh J Avatar answered Nov 15 '22 08:11

Saurabh J