I incorporated the same code found on primefaces.org, specifically this link: http://www.primefaces.org/showcase/ui/ajaxStatusScript.jsf
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" header="Status"
draggable="false" closable="false">
<p:graphicImage value="/design/ajaxloadingbar.gif" />
</p:dialog>
However, my webpage fails to display any content when this piece of code is present. Upon inspecting with firebug, I receive a JavaScript error stating Uncaught ReferenceError: statusDialog is not defined.