[jboss-user] [JBoss Seam] - Re: sequence execution not followed in seam reemoting

surajmundada@yahoo.com do-not-reply at jboss.com
Fri Feb 2 03:16:27 EST 2007


Thanks for the reply. 

I tried to write a callback method but could not catch the return string. 

My listener method looks like : 

  | @WebRemote
  | public String resetPage() {
  |      logger.info(helper.formatLogMessage("Resetting the page"));
  | 		
  |      if(searchDrugtUI != null) {
  |             searchDrugtUI.setFamily("");
  |             searchDrugtUI.setNameTypAnt("");
  |             searchDrugtUI.setWhoCode("");
  |             drugPEList = null;
  |      }
  | 		
  |      return "success";
  | }	
  | 

Javascript looks like :

  | function fun_resetPage() {
  |    	alert('in fun_resetPage');
  |     	Seam.Component.getInstance("searchListener").resetPage(resetPageCallback);		    	
  | }
  | 			
  | function resetPageCallback(result) {
  | 	alert(result);
  | 	if(result == 'success') {				fun_openSearchWindow();
  |                 }
  | }
  | 
  | function fun_openSearchWindow(){
  | 	Seam.Remoting.setDebug(true);
  | 
  |     	Seam.Component.getInstance("searchListener").resetPage();
  | 	//alert('in fun_openSearchWindow()');
  | 	window.open('search.jsf','search','scrollbars,height=400,width=700');
  | }
  | 

I have enabled debug mode and can see the "success" string in response packet. But control does not come to "resetPageCallback()" method. 

Is there any thing wrong with "....("searchListener").resetPage(resetPageCallback);" ??? 

I am not sure if I can put optional parameter "resetPageCallback" in method call to "resetPage()" when I have no compulsary paratmeter to pass. 

Regards, 

Suraj

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

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



More information about the jboss-user mailing list