Currently, I am facing an issue with the loading bar. It seems to disappear before the page content is fully loaded. Ideally, I would like the loading bar to remain visible until the entire page has been loaded correctly.
In the layout.xhtml file, I have included the following code:
<li class="#{loginBean.subMenu eq 'Booking_History' ? 'active' : ''}">
<p:commandLink rendered="#{loginBean.logedadmin or loginBean.logedagent}" action="#{bookingHistoryBean.showList}" value="Booking History"
immediate="true">
</p:commandLink>
Next, here is a snippet of the Java method being used:
public String showList() {
startLoadingBar();
status="All";
noOfRecords=0;
getList();
searchBookingHistory();
log.info("Loaded successfully");
return "/pages/internalstackholders/bookinghistory.jsf?faces-redirect=true";
}
Additionally, in bookinghistory.xhtml, the following code for the loading dialog box is present:
<p:dialog widgetVar="statusDialog" id="statusbar" modal="true"
showEffect="fade" showHeader="false" closable="false" width="250"
resizable="false">
<h:form>
<center>
<img src="#{request.contextPath}/resources/images/loading.gif" /><br />
<b>Please wait...</b><br />
<br />
</center>
</h:form>
</p:dialog>
If anyone has suggestions on how to resolve this issue, please feel free to share!