This content has been marked as final.
Show 4 replies
-
1. Re: how to programmatically invoke rerender
gizola Oct 29, 2008 3:26 PM (in response to gsegura)One thing you could try is:
place any not visible component somewhere on the form (eg an empty outputLabel) wich has any javascript event (onchange, onblur, anything).
add an a4j:support which fires on the event your choice, and set reRender the components with it as you wish.
So when you want to reRender the components, just call the javascript event function of the component from javascript. The ajax event will be fired, and then the components will be reRendered.javascript: function fireaction(id) { var obj = document.getElementById(id); obj.onblur(); } xhtml: <h:outputLabel id="hidd" value=""> <a4j:support event="onblur" reRender="comp"> </a4j:support> </h:outputLabel>
Try it, it seems to work, I tried it with action not with reRender, but the action method was called.
Gizola -
2. Re: how to programmatically invoke rerender
gizola Oct 29, 2008 3:27 PM (in response to gsegura)Ohh, to call it:
fireaction('form:hidd');
So you have to call the onblur event on the 'hidd' component, not on the a4j:support component!
Gizola -
3. Re: how to programmatically invoke rerender
gsegura Oct 29, 2008 6:14 PM (in response to gsegura)of course! nice simple trick.
thanks! -
4. Re: how to programmatically invoke rerender
nbelaevski Oct 30, 2008 7:37 PM (in response to gsegura)Hi,
Use a4j:jsFunction.