0

I have a datatable, with certain fields, when moused-over, show/hide some pop-ups (kind of like tooltips). I don't want the loading of these to slow down the initial page load so I can't pre-load them. I've tried loading them lazily (on mouseover) but the content can sometimes take a few seconds to load and that isn't fast enough for a mouseover.

Is there a way I can load the page so that the user can interact with it but then, in the background, have JSF load up the popup contents then? Then the mouseover can just toggle show/hide.

I'm using JSF 2.2, ICEfaces 3.3 and Omnifaces 2.1 if there are any mechanisms in those that may help.

UPDATE: Per this thread: Execute managebean method from javascript onload event

I tried this in my h:form:

<o:commandScript name="onload" action="#{bean.onload}" />
<h:outputScript target="body">onload()</h:outputScript>

But this only ran once, when the page loaded. Subsequent form submissions, when the datatable is updated, does not fire the onload method.

UPDATE2: I must have edited this question @ the same time that BalusC marked it as a dupe. I did try the stuff in that supposed "duplicate" answer but it didn't quite work the way I needed it to.

UPDATE3: In case my issue really is a duplicate, I've asked a new question that tries to use the duped answer: https://stackoverflow.com/questions/32191320/how-can-i-get-my-jsf-bean-method-to-run-after-a-form-submission-reloads-the-page

Community
  • 1
  • 1
wsaxton
  • 1,030
  • 15
  • 34
  • why don't you load lazily when the page is ready ? or on page mouse over ? – Ced Aug 24 '15 at 19:07
  • Not sure what you are asking? I'm currently loading lazily (on mouseover) but the mouseover hits the database so sometimes the pop-up can take seconds to load. I'm trying to avoid this and make the pop-ups appear instantly somehow. – wsaxton Aug 24 '15 at 19:43
  • Can't use Primefaces right now. Stuck using ICEfaces for the foreseeable future. – wsaxton Aug 24 '15 at 20:17
  • Going to re-mark this as a duplicate – wsaxton Aug 26 '15 at 14:17

0 Answers0