5

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Wizard Sultan
  • 830
  • 7
  • 22
  • 45

2 Answers2

7

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.

Matt Handy
  • 29,855
  • 2
  • 89
  • 112
2

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)

Saurabh J
  • 123
  • 1
  • 8
  • 1
    How are your words easier than the other answer? Almost the same... You can propose edits to answer, more helpful in this case! – Kukeltje Mar 10 '16 at 08:12
  • 4
    @Kukeltje Because many users might not directly be able to relate the term "ajaxStatus" to the "processing box that we see, shown so that the user knows that there is some processing going on". I thought that if someone cannot completely understand from the 1st answer, they might be able to understand from mine. Moreover, it might help to come up in google ranking, with the addition of the words like "processing" and "dialog" which users would usually search for (google also crawls the content, not just the url and title) If you still think otherwise, please suggest an alternative Thanks – Saurabh J Mar 11 '16 at 07:08