[jboss-user] [JBoss Seam] - Seam Remoting & Javascript

pdpantages do-not-reply at jboss.com
Tue Sep 26 21:50:50 EDT 2006


Hello Seamers, I have another question. 

I have been having some problems with seam remoting and I wanted to back off and 
try a simple test to start. 

I have run the example progress bar application on my server and it works as
expected. 

I wanted to then see if I could run a simple poller, so I started
out with the progress bar javascript...

I removed the remote call, & var declaration and the src statement for
seam/remoting/interface.js?progressBarAction, resulting in the code
below. I have defined a button to start it off.

I am just trying to see if the getProgress() function will run after
the 1000 timeout & then reschedule itself.

But... I only see first alert "Query Progress" but that is it. The
getProgress() function is never run, not even once. Somehow the  timeout is being cancelled? I get no msgs in the javascript console. 

Thank you, in advance, for any ideas... PdP


  | 
  |       <script type="text/javascript" src="/client/seam/remoting/resource/remote.js">
  |          <!--
  |          // This space intentionally left blank
  |          //-->
  |       </script>
  | 
  |       <script type="text/javascript">
  |     //<![CDATA[
  |     
  |             Seam.Remoting.setDebug(true);
  |             // don't display the loading indicator
  |             Seam.Remoting.displayLoadingMessage = function() {};
  |             Seam.Remoting.hideLoadingMessage = function() {};
  |     
  |             // var progressBarAction = Seam.Component.getInstance("progressBarAction");
  |     
  |             function queryProgress() {
  |             alert("Query Progress");
  |             setTimeout("getProgress()", 1000);
  |             }
  |     
  |             function getProgress() {
  |             alert("Get Progress");
  |             queryProgress();
  |             }
  |     
  |             //function progressCallback(progress) {  
  |             //progressBar.setPosition(progress.percentComplete);
  |             //if (progress.percentComplete < 100)
  |             //queryProgress();
  |             //}
  | 
  |     // ]]>
  |       </script>  
  | 

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

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



More information about the jboss-user mailing list