1 Reply Latest reply on Feb 4, 2008 1:05 PM by sergeysmirnov

    ajaxSingle not working?

    sunfire

      Hi,

      there is a post like this in the A4J User forum but since it was not answered there and the projects got merges I thought I'll post the issue here again. I have a regular form that posts some data. I added a <a:support [...] /> tag to one of the controls and it works ok. When I debug in Firebug I see that its posts the form on event="onchange". But I don't want the entire form to get posted so I added ajaxSingle="true" to the a:support but the post still contains the entire form. Isn't it supposed to only send the one control then?

      This is the request with ajaxSingle=true

      AJAXREQUEST=_viewRoot&general_form=general_form&general_form%3AtermDecoration%3AtermEdit=36&general_form
      
      %3ApaymentOptionDecoration%3ApaymentOptionEdit=PURCHASE&general_form%3AsalesTaxDecoration%3AsalesTax
      
      =8.25&general_form%3AaddSetupFeeDecoration%3AaddSetupFee=true&general_form%3AcallPackageDecoration%3AcallPackage
      
      =LIMITED_0_C&general_form%3AcallPackageDecoration%3AcallPackage=LIMITED_0_C&general_form%3AaddInstallationDecoration
      
      %3AaddInstallation=true&general_form%3Aj_id295=&general_form%3ApartsDiscountDecoration%3ApartsDiscount
      
      =0.0&general_form%3AservicesDiscountDecoration%3AservicesDiscount=0.0&javax.faces.ViewState=_id26&general_form
      
      %3AcallPackageDecoration%3Aj_id214=general_form%3AcallPackageDecoration%3Aj_id214&



      This is the request with ajaxSingle=false
      AJAXREQUEST=_viewRoot&general_form=general_form&general_form%3AtermDecoration%3AtermEdit=36&general_form
      
      %3ApaymentOptionDecoration%3ApaymentOptionEdit=LEASE&general_form%3AsalesTaxDecoration%3AsalesTax=8.25
      
      &general_form%3AaddSetupFeeDecoration%3AaddSetupFee=true&general_form%3AcallPackageDecoration%3AcallPackage
      
      =LIMITED_0_C&general_form%3AaddInstallationDecoration%3AaddInstallation=true&general_form%3Aj_id295=
      
      &general_form%3ApartsDiscountDecoration%3ApartsDiscount=0.0&general_form%3AservicesDiscountDecoration
      
      %3AservicesDiscount=0.0&javax.faces.ViewState=_id24&general_form%3AcallPackageDecoration%3Aj_id214=general_form
      
      %3AcallPackageDecoration%3Aj_id214&


      Isn't the request supposed to be more lightwight when you set ajaxSingle to true? RF version is 3.1.4.GA

      Thanks

        • 1. Re: ajaxSingle not working?

          yes, the AjaxSingle request contains the entire form. So, it works like designed. The difference is only on the server side.
          Previous version used to send the single form element. However it does not work for cases where the custom component uses more then one field to store the data. Also, most frameworks add specific field(s) to the form that are important for processing the request right way (like conversation id in Seam). So, the idea of limiting the post data was failed due to practical cases.