OverlayPanel not updating content..

UI Components for JSF
Post Reply
kyriv
Posts: 8
Joined: 29 Feb 2016, 21:10

23 Sep 2016, 16:46

Hello,

I seem to have run into a problem and I was wondering if anyone has some insight as to what is happening. For the application I'm in the process of building I wanted to create a splash type startup panel to display insightful information of hardware software checks the app is performing before allowing the user access. To do this I decided to use the overlaypanel. The status message is initialized to "Start Init..." in the "startup" bean.

Page:

Code: Select all

<h:body styleClass="LoginBody" onload="PF('splashPanel').show();">

...

<p:overlayPanel widgetVar="splashPanel" hideEffect="fade" dismissable="false" dynamic="true" styleClass="Centered" style="width: 800px; height: 400px;" rendered="#{not startup.ready}" showEvent="none">
        <div class="Splash">
        	<div class="Version">
	        	<h:outputText value="#{coreLabel['core.version']}" /><h:outputText value="&#160;" /><h:outputText id="version" value="#{startup.currentVersion}" /> 	
        	</div>
        	<fti-projectina:spinner />
        	
        	<h:outputText id="statusMsg" value="#{startup.statusMessage}" styleClass="StatusMessage" />
   	     	
   	     	<h:outputText value="#{coreLabel['core.copyright']}" styleClass="Copyright" /> 
		</div>
	    <h:form>
        	<p:remoteCommand name="onload" action="#{startup.callInit()}" autoRun="true" update="statusMsg"/>
    	</h:form>
    </p:overlayPanel>
In my "startup" bean, in the callInit method I do

Code: Select all

      setStatusMessage("Initializing devices...");
      RequestContext.getCurrentInstance().update("statusMsg");
When I compile and run the app, the status message never gets updated to "Initializing devices....".
If I move the

Code: Select all

<h:outputText id="statusMsg" value="#{startup.statusMessage}" styleClass="StatusMessage" />
outside the overlayPanel it gets updated perfectly.

I had read that the overlay panel is prerendered (cached). If this is true than what purpose does the "dynamic" attribute serve?

Thanks for your help.

kyriv
Posts: 8
Joined: 29 Feb 2016, 21:10

23 Sep 2016, 21:43

So it seems that the render attribute and the dynamic attribute were causing my issues. Removing those allowed the h:outputText element to be updated from the bean. Unfortunately the onload attribute in the body tag was not showing the overlay panel so I had to write a method in my bean and call it from an autorun remote command, executing

Code: Select all

RequestContext.getCurrentInstance().execute("PF('splashPanel').show();");
as opposed to using the rendered attribute in the overlaypanel.

Needless to say it works now.

thomasf2220
Posts: 2
Joined: 24 Sep 2016, 10:41

24 Sep 2016, 12:26

This issue of not updating content occurred frequently. The value of learning how to write good essays transcends university learning into real-life applications outside of academia. Correct grammar and spelling usage is important to any form of writing, whether it be a business report or a note to a child's principal.Good writing is about clear thinking and communicating our ideas
Hire the best cheap essay writing service at http://essayservices.org/ .

thomasf2220
Posts: 2
Joined: 24 Sep 2016, 10:41

24 Sep 2016, 12:30

I had the same problem of not updating content too.You may be given essay or assignment titles which you will need to interpret. If you are setting your own title, you still need to make sure the writing matches the title.The title is not simply an invitation to write anything you like about the topic. It will be asking for something specific, and is often closely related to the module content and the module reading.
Hire the best cheap essay writing service at http://essayservices.org/ .

milijacob
Posts: 1
Joined: 25 Nov 2016, 10:46
Location: USA
Contact:

25 Nov 2016, 10:52

I was facing the same problem of not able to update the content. When we are given an essay or assignment title for updation it will asking something closely related to the module content. This problem occurs often without able to update the content.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests