-
1. Re: oncomplte and rerender
nbelaevski Jun 28, 2010 4:00 AM (in response to ipraveenjain)hi,
oncomplete is executed after re-rendering has been completed on the client side. Use onbeforedomupdate to execute JS before re-rendering.
-
2. Re: oncomplte and rerender
ipraveenjain Jun 28, 2010 5:03 AM (in response to nbelaevski)but the problem now is it onbeforedomupdate executes before action.
i want
1- action
2- javascript
3- rerender
-
3. Re: oncomplte and rerender
ilya_shaikovsky Jun 28, 2010 5:12 AM (in response to ipraveenjain)the sequence is
- onsubmit - JS
- server side request processing and action invocation
- response came back
- onbefore dom update js
- dom updates
- oncomplete js
onbeforedomupdate can't be fired before action as it fired only after response came back.
-
4. Re: oncomplte and rerender
ipraveenjain Jun 28, 2010 5:26 AM (in response to ilya_shaikovsky)that is ok,
but is there any approach using which i can acchieve my need
first i want to call action-- java function call
then javascript call
and then Rerender
-
5. Re: oncomplte and rerender
ilya_shaikovsky Jun 28, 2010 5:47 AM (in response to ipraveenjain)<a4j:button action="server side action" onbeforedomupedate="js function before reRender" reRender="some render zones"/>
It should works just as you menioned.
-
6. Re: oncomplte and rerender
ipraveenjain Jun 28, 2010 7:05 AM (in response to ilya_shaikovsky)yes i am doing the same
<a:commandButton action="javafunctioncall" onbeforedomuodate="js function call" Rerender="someid" />
but it execute JS function first, (before action)
-
7. Re: oncomplte and rerender
ilya_shaikovsky Jun 28, 2010 7:17 AM (in response to ipraveenjain)please describe carefully what do you mean before action. It can't be like that because called only after request finished(so all the acitons taken place)
-
8. Re: oncomplte and rerender
nbelaevski Jun 28, 2010 7:33 AM (in response to ipraveenjain)You can add a4j:jsFunction called by oncomplete, but this will add one more AJAX request.