[jboss-user] [JBoss Seam] - Re: A4J - Can I refresh a components value without applying

loopingrage do-not-reply at jboss.com
Mon May 14 18:39:10 EDT 2007


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 :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045610#4045610

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045610



More information about the jboss-user mailing list