-
1. Re: a4j Delayed render zone
sergeysmirnov Mar 26, 2007 12:41 PM (in response to dinoliste)a4j:support has a requestDelay attribute where you can define the delay.
-
2. Re: a4j Delayed render zone
dinoliste Mar 27, 2007 3:58 AM (in response to dinoliste)I tested this property and it works as you say, but the action is fired by an event, and i think it does not fit to my needs. The oncomplete event doesent work for me, and i read about it's incompatibility with ie and the action artificially generated from javascript can be stoped by popup blokers.
I will give you an example so the requsts to became more clear:
i have the next fragment loaded (it is loaded with ajax, not with the whole page )<a4j:outputPanel id="myCenterPanel"> text to be before.... text to be after... </a4j:outputPanel>
and after n millisecounds i have to obtain the next fragment without rerendering the "text to be before...." and "text to be after..." text:<a4j:outputPanel id="myCenterPanel"> text to be before.... <a4j:outputPanel id="myRows"> <!-- delayed loaded fragment --> item1 item2 ...... </a4j:outputPanel> text to be after... </a4j:outputPanel>
Another question related to this problem:
How can you make a zone not rendered at the begining and render it after an event from a4j? I tried to add to this zone rendered=false and then in another component reRender=MyZone, and it doesent work. If i let it to rendered=true it is shown/loaded from the begining. -
3. Re: a4j Delayed render zone
sergeysmirnov Mar 27, 2007 6:34 PM (in response to dinoliste)You should not point with reRender to the component that might have rendered="false". Point to one of the parent component is a right way to go.
I mentioned the reason several times. So, it looks like a good candidate for FAQ.
Delivering the update, but applying it with timeout is not a future of ajax4jsf. I see only the way with second ajax request triggered by oncomplete
BWT, what is the problem with oncomplete you spoke about? -
4. Re: a4j Delayed render zone
dinoliste Mar 29, 2007 3:48 AM (in response to dinoliste)It could work this way but i need a zone that is not render initial and to render it after an event (in this case the delayed onload). Is the only way to do this by keeping a flag on the server and send the content only on the second request of the zone, or can the ajax4jsf do this?
It would be useful if ajax4jsf could split some parts of a rendered zone (split defined by user) to be rendered in background later use.
I know that the timeout is used for skipping multiple requests, but is a good thing when you want to do exotic stuff like my problem. I would be happy if would be included in next releases.
Sorry about the oncomplete i tried myself and is working, seems i was misinformed :) -
5. Re: a4j Delayed render zone
sergeysmirnov Mar 29, 2007 1:14 PM (in response to dinoliste)May be you can use a javascript what replace style="display:none" with style="display:block" by timer.
-
6. Re: a4j Delayed render zone
beligum Apr 14, 2010 1:34 PM (in response to dinoliste)You can use a a4j:poll to get the requested behaviour:
<a4j:poll id="pollerId" reRender="whatToRerender" limitToList="true" interval="5000" ajaxSingle="true" />
The trick is to set limitToList to "true", but _not_ include the ID of the poller in it's reRender list.
This way, the reRender will fire once after the specified interval.
Works for me.
b.