I'm having a problem in which a form which works fine when on a page
normally, has only null values for its submitted fields when it's been
AJAX'd in to another page.
I have a panel including my form sitting on MyPage. I also have a
MyPageAjax, which included the same panel with no chrome, i.e. no
headers, navigation, almost nothing but that panel, in fact. On
ParentPage, I have a link to MyPage, which I change on page load via
Javascript to an AJAX-y in-page load of MyPageAjax. This works fine,
and I've used this technique a few times before, but only with display
content. This one includes a form, and that seems to cause problems.
When I visit MyPage and submit the form, everything goes as expected.
But when I'm on ParentPage and AJAX in the MyPageAjax, then submit, the
form is finding null values for all its controls. They are going across
the wire properly, according to the Firefox LiveHttpHeaders pluc-in, and
the onSubmit() is being called. But the FormComponents all have models
which report as null.
Any ideas why?
The trickiest thing I had to do here is in the Javascript. The
ParentPage has a URL like:
http://example.com:8080/myapp/ParentPage
but MyPage and MyPageAjax have page parameters, such as
http://example.com:8080/myapp/MyPage/id/16/
http://example.com:8080/myapp/MyPageAjax/id/16/
So the form action on these pages looks like this:
../../../?wicket:interface=:8:panel:form::IFormSubmitListener::
I end up changing this in JS to
/myapp/?wicket:interface=:8:panel:form::IFormSubmitListener::
so it will work from the URL of ParentPage. But that doesn't seem
likely to be at issue as the onSubmit is in fact being called.
Any suggestions?
Thanks,
-- Scott Sauyet
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]