Thanks for the answer Jeremy,

I actually tried both: having the submit button inside and outside the form.
It didn't make a difference.

I don't think I'm replacing the form - I'm re-rending it on error (so you
can see the feedbackmessage), but I don't think that counts as "replacing"
it.

Also, what baffles me is that everything works correctly in IE and Chrome -
I'm only getting this problem in FF.

--------------> mystified.  :)

KOAC

On Fri, May 28, 2010 at 6:52 PM, Jeremy Thomerson <[email protected]
> wrote:

> On Fri, May 28, 2010 at 8:45 PM, King Caffeine
> <[email protected]>wrote:
>
> > Hi,
> >
> > I'm using a panel inside a modal window.
> > Inside the panel is a form, and the form has a FeedBackPanel and two text
> > fields, one required.
> > I'm using an IndicatingAjaxButton to submit the form.
> >
> > Filling out the form with valid values and submitting it works fine.
> >
> > The problem occurs when there's a form validation error:
> >
> > Say I click the submit button without filling in the required field.
> > The IndicatingAjaxButton's onError() method is called, the form is
> > re-rendered and an error message appears in the feedback panel.
> > So far, so good.
> > Next, I enter the missing value into the required text field.
> > I click the submit button.
> > I get a "Are you sure you want to navigate away from this page...."
> browser
> > alert.
> > My Wicket Ajax Debug says that I was
> > "Trying to submit form with id 'form12' that is not in document."
> >
> > Curiously, this happens only in Firefox and not in IE.
> >
> > If I try replacing the IndicatingAjaxButton with an AjaxSubmitLink, I do
> > *not* get the "Are you sure you want to navigate away..." warning, but I
> > still get the debug message saying that I was
> > "Trying to submit form with id 'form12' that is not in document," and
> > nothing happens.
> >
> > I'm a bit baffled... is the submit button losing the reference to the
> form
> > somehow?
> > Anyone seen this?
> >
> > Thank you!
> >
> > King of All Caffeine
> >
>
> Haven't seen this before, but I wonder if you are replacing the form and
> your buttons are outside of it.  That could probably cause it.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>

Reply via email to