-
1. Re: combining a4j:status and rich:effect and delayed content
ilya_shaikovsky Nov 16, 2009 6:36 AM (in response to mark77)1) use onstart and onstop and call effect functions registered by using name attribute on rich:effect.
2) use jquerry to catch document ready event and call registered jsFunction which will fetch additional data. -
2. Re: combining a4j:status and rich:effect and delayed content
mark77 Nov 16, 2009 7:29 AM (in response to mark77)Hi Ilya,
thanks for your reply.
1) I already tried this - a4j is too fast :-) the panel starts its effect but the effect is aborted because the new content is already fetched before the effect is finished...
2) OK, i hoped there was an easy way like an attribute "loadAsync" or something like that. :-) So, I'll dive into jquery. Something like:<rich:panel loadAsync="true"> <a4j:include viewId="longCalc.jsf"/> </rich:panel>
Br, Mark -
3. Re: combining a4j:status and rich:effect and delayed content
ilya_shaikovsky Nov 16, 2009 7:32 AM (in response to mark77)1) I already tried this - a4j is too fast :-)
you could specify delays using parameters. -
4. Re: combining a4j:status and rich:effect and delayed content
mark77 Nov 16, 2009 10:42 AM (in response to mark77)"ilya_shaikovsky" wrote:
1) I already tried this - a4j is too fast :-)
you could specify delays using parameters.
this sounds interesting - how can i add a delay here, so that the effect that will be called upon mystat's onstart first runs through and then the ajax request from the link click takes place ?<a4j:status id="mystat"> ... </a4j:status> <a4j:outputPanel id="change"> ... <a4j:commandLink action="#{someBean.action}" reRender="change" status="mystat"/> ... </a4j:outputPanel>
-
5. Re: combining a4j:status and rich:effect and delayed content
mark77 Nov 17, 2009 3:00 AM (in response to mark77)So, fading out before ajax'ed reRendering works this way:
<a4j:outputPanel id="cmsBlock"> <a4j:commandLink requestDelay="1000" status="cmsstatus" value=">> Back <<" action="#{richFacesBean.cmsBack}" reRender="cmsBlock"> <rich:effect event="onclick" for="cmsBlock" type="SwitchOff" params="duration:0.8,from:1.0,to:0.0" /> </a4j:commandLink> </a4j:outputPanel>
But I still have no glue, how to Fade the Panel in once it is reloaded. Any idea?
Br, Markus -
6. Re: combining a4j:status and rich:effect and delayed content
ilya_shaikovsky Nov 17, 2009 4:07 AM (in response to mark77)Call the fade in effect on oncomplete. Add also some delay in order to guaranty that if the request will be complete in less than fade out duration - it will be called later.
-
7. Re: combining a4j:status and rich:effect and delayed content
harpritt Jun 14, 2010 10:30 AM (in response to ilya_shaikovsky)Hi
been struggling with point 1 from the origional post since before lunch
I cant see what im doing wrong, if i replace the effect with a javascript function everything works fine..
all help is greatly appreciated.
<a4j:status id="commonstatus" onstop="fade2();" /> <rich:effect name="fade2" type="Highlight" for="currentSummaryMinus1" params="duration:1, startcolor:'#cccccc'" />
Harpritt