This content has been marked as final.
Show 1 reply
-
1. Re: A4J - Can I refresh a components value without applying
loopingrage May 14, 2007 6:39 PM (in response to loopingrage)Here is the solution I came up with. The magic is in jsFunction's "bypassUpdates" attribute.
<a4j:commandButton id="cmdRefresh" value="Refresh" reRender="lstDestination" />
becomes<input type="button" value="refresh" onclick="getManagerId()" /> <a4j:jsFunction name="getManagerId" data="#{BackingBean.managerId}" oncomplete="refreshManager(data)" reRender="lstDestination" bypassUpdates="true" /> <script> function refreshManager(data) { document.forms[0].lstDestination.value = data; } </script>
I hope this helps someone :)