Thanks Freddy!

My intention is not to submit the form rather default some fields using the 
ajax call based on a value from a field earlier in the form.  Here is my 
javascript:


function lookup(field, url) {
    $.get(url,
    { 'username': $(field).val(),'_eventName': 'lookup'},function(data) {
      $('#enrollerfields').html(data);
    }
  );
}


function ajaxLink(link, update) {
    //alert(link);
  $.get(link, function(data) {
    $(update).html(data);
    $(update).show();
  });
  return false;
}


Action Bean

Where EFORM is a jsp page holding fields.

 public Resolution lookup() {

        if (username != null && username.length() > 0) {

            d = distDao.findByUsername(username);
            if (d == null) {
                d = new Dist();
            }
            setD(d);
        }
        return new ForwardResolution(EFORM);
    }

Thanks!
Joaquin





On Aug 5, 2010, at 3:42 AM, Freddy Daoud wrote:

> Hi Joaquin,
> 
>> I am trying to do a ajax call inside a wizard form and I get this error
>> message:
>> 
>> Unhandled exception caught by the Stripes default exception handler.
>> net.sourceforge.stripes.exception.StripesRuntimeException: Submission of
>> a wizard form in Stripes absolutely requires that the hidden field
>> Stripes writes containing the names of the fields present on the form is
>> present and encrypted (as Stripes write it). This is necessary to prevent
>> a user from spoofing the system and getting around any security/data
>> checks.
>> 
>> Any ideas?
> 
> Yes, you are probably not including the hidden parameter that Stripes
> adds to wizard forms, when you are submitting the form with jQuery.
> 
> Here's one way to do it:
> 
> function submitForm(button) {
>  var form = button.form;
>  var params = $(form).serializeArray();
>  params.push({name: '_eventName' , value: button.name});
>  $.post(form.action, params, function(data) {
>    // do something with data
>  });
>  return false;
> }
> 
> Hope that helps.
> 
> Cheers,
> Freddy
> 
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users

Joaquin Valdez
[email protected]
(541) 690-8593





------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to