Hi Andrew,

You have to override your ajaxbehavior#updateAjaxAttributes()

protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
    super.updateAjaxAttributes(attributes);

    attributes.setMethod(Method.POST); //if you wish to post
    attributes.setFormId("yourFormId");
}

Best regards,
Sebastien.


On Tue, Jul 16, 2013 at 5:21 PM, Andrew Schetinin <ascheti...@gmail.com>wrote:

> Hi,
>
> I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other
> problems) I have a trouble with porting the code that submitted a form from
> within a wiQuery dialog.
>
> My code is based on the sample that can be found here:
>
> http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407
>
> The trick here was that the Dialog contains a form which has to be
> submitted when OK button is clicked, and that was done with the following
> code:
>
>                 buttonsAdv.add(new DialogButton("Save",
>
> JsScope.quickScope("wicketSubmitFormById('form','" +
>
> formAjaxBehavior.getCallbackUrl() +
>                                                 "', null, null, null, null,
> null);")));
>
> Unfortunately, in Wicket 6.9 this code fails to find the function
> wicketSubmitFormById()
>
> I also have a feeling that in my previous attempt to port this code to
> Wicket 6.6 the same functionality worked fine.
>
> The question is - how is it possible to submit a form from JS?
>
> Regards,
>
> Andrew
>
> --
> Andrew Schetinin
>

Reply via email to