1 Reply Latest reply on Jul 1, 2008 3:27 AM by Raj Tiwari

    Seam Remoting: Strange behaviour on initial request

    Raj Tiwari Newbie

      My application's home page redirects to a login page. The login page has a two-step process:

      1. User enters their Id and hits enter. Server receives id, does some processing

      2. User is presented a second page where they complete their login. My application is doing open id.

      I am trying to use Seam Remoting for this. My login page has the following form:

      <form action="#">
                  <h:inputText id="claimedId"  
                      style="background: white url('../img/openid-logo-small.gif') no-repeat scroll 0pt 50%; padding-left: 18px;"/>
                      <h:commandButton id="openIdLogin" value="Log in" onclick="beginLogin('openid')"/>
                  <td id="progress_indicator"></td>             

      The beginLogin() function performs the Seam remoting interaction:

      function beginLogin(loginType)
          // Set the conversatoin id
          // start the progress indicator
          jQuery("#progress_indicator").html("<img src='../img/bigrotation.gif'/>");
          var sClaimedId = jQuery("#claimedId").attr("value");
          // submit the claimed id
          Seam.Component.getInstance("LoginBean").beginLogin(sClaimedId, loginType, beginLoginCallBack);

      When the user enters their id and submits, I see my LoginBean.beginLogin() method on the server being duly invoked. However, my callback is not invoked and there is no remoting response in the debug window. Instead, the browser is redirected to the same page with additional query arguments:


      When the user re-enters their open id on this page, once again, the login bean is invoked and this time things work.

      Can any remoting experts help me understand why Seam does not like my initial request?