Hi all,

I have one form in which I need two submit buttons with different
behaviour. The first is to submit the form with default
implementation, to do whatever the form needs to do. The second is to
submit the form WITHOUT doing what the form normally does, but
something completely different and redirect differently afterwards.

I've implemented this simply following the official docs:

https://cwiki.apache.org/confluence/display/WICKET/Multiple+submit+buttons

The problem is that Wicket can't properly find the submitting button
of the second request and therefore routes ALL requests to "onSubmit"
of the form only. "onSubmit" of the additionally added button never
fires. During debugging, one can easily see that when iterating
possible components in "Form.findSubmittingButton", Wicket doesn't
find the necessary component name of the second buttin in the request
parameters. 

My request looks like the following, with the first being the
requested URL:

> wicket/bookmarkable/de.am_soft.sm_mtg.frontend.pages.real_estates.PgInstallTest?22-9.-html-body-realEstates.fmInstallTest

Posted form data:

> realEstates.fcPnTargetSearch:realEstate: F6 F9
> text.seconds: Sekunden
> text.minutes: Minuten
> text.hours: Stunden
> text.days: Tage
> realEstates.fcPnBcdUpload:basicClaimsData.upload: (binary)
> readings.fcPnTimeWindowDetailed:timeWindow.detailed.negativeVariation.quantity:
>  15
> readings.fcPnTimeWindowDetailed:timeWindow.detailed.negativeVariation.unit: 
> MINUTE
> readings.fcPnTimeWindowDetailed:timeWindow.detailed.timestamp.date: 2020-06-25
> readings.fcPnTimeWindowDetailed:timeWindow.detailed.timestamp.time: 18:16
> readings.fcPnTimeWindowDetailed:timeWindow.detailed.positiveVariation.quantity:
>  15
> readings.fcPnTimeWindowDetailed:timeWindow.detailed.positiveVariation.unit: 
> MINUTE
> readings.fcPnOptClientTz:options.clientTimeZone: Europe/Berlin
> realEstates.fcPnBcdUploadCharset:basicClaimsData.charset: Windows-1252
> readings.fcPnOptCsvCharset:options.csvCharset: Windows-1252
> realEstates.fcPnBcdUploadCache:basicClaimsData.cache: on
> readings.fcPnOptRecords:options.mostCurrentRecords: on

The name of the second submit button within the same form:

> bcdHistory.upload

While the button is properly reflected in the HTML, there's no hint to
it in the posted data or in the requested URL.

So how should adressing different "onSubmit"s work in generally? Does
the parent form encode hints in the requested URL? If so, what could
be the reason that it doesn't in my case?

Thanks!

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to