[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - sequence of execution not followed in seam remoting

surajmundada@yahoo.com do-not-reply at jboss.com
Thu Feb 1 10:43:55 EST 2007


Hi, 

I was facing a lot of problem in implementation of pop-up in my application. 

Eveytime I would invoke a pop-up, the javascript part (written in onclick attribute) would get executed before the my listener method (written in action attribute).

After reading Seam Remoting, I tried to call a listener method from javascript function and was able to do so in the first attempt. 

Now my code looks like this: 


  | 
  | 	<script type="text/javascript" src="seam/remoting/resource/remote.js">
  | 		</script>
  | 		
  |   		<script type="text/javascript" src="seam/remoting/interface.js?searchListener">
  |   		</script>		
  | 
  | 		<script type="text/javascript">
  | 	  		function fun_openSearchWindow(){
  | 				alert('in fun_openSearchWindow()');
  | 		    	Seam.Component.getInstance("searchListener").resetPage(resetPageCallback);
  | 
  | 				window.open('search.jsf','search','scrollbars,height=400,width=700');
  | 		    }		      
  | 	 	</script>
  | 
  | 


But my problem is that 'window.open' function gets executed first before my 'resetPage' method gets executed completely, defeating the whole purpose of remoting in my case. 

Is there any way to keep the sequence of execution ? 

Thanks in advance ... 

Suraj

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

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



More information about the jboss-user mailing list