Re: Wicket can't distinguish multiple submit button in case of one form.
Guten Tag Thorsten Schöning, am Freitag, 26. Juni 2020 um 10:44 schrieben Sie: > I don't understand what I'm doing wrong, the plain HTML submit-input > is pretty much exactly what is documnted elsewhere: Found the problem: JS-handlers disabled the inputs BEFORE actually sending the form to not let users accidently click too many times and stuff like that. Disabled inputs are not part of POSTed data. Need to solve that differently and afterwards Wicket's parts most likely work as expected as well. 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
Re: Wicket can't distinguish multiple submit button in case of one form.
Hi Thorsten, this is all HTML standard: https://stackoverflow.com/questions/2129346 I have no clue why it doesn't work for you. Please isolate the problem in a jsfiddle or similar. Have fun Sven On 26.06.20 10:44, Thorsten Schöning wrote: Guten Tag Thorsten Schöning, am Freitag, 26. Juni 2020 um 10:34 schrieben Sie: Using a button instead works as one would expect: When that button is clicked, the form gets submitted and the name and value of the button are send as part of the POST-data. If any other "submit" gets clicked, no names and values are part of the POST-data, not even the name and value of the button. Which makes sense, because it wasn't clicked. foobar button I don't understand what I'm doing wrong, the plain HTML submit-input is pretty much exactly what is documnted elsewhere: https://stackoverflow.com/questions/22579616/send-value-of-submit-button-when-form-gets-posted Jeder Submit-Button hat ein individuelles name-Attribut, mit dem die Anwendung auf dem Server den Datensatz identifiziert. https://www.mediaevent.de/html/submit.html Mit freundlichen Grüßen, Thorsten Schöning - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket can't distinguish multiple submit button in case of one form.
Guten Tag Thorsten Schöning, am Freitag, 26. Juni 2020 um 10:34 schrieben Sie: >> > name="foobar" >> value="foobar" >> title="foobar" >> /> Using a button instead works as one would expect: When that button is clicked, the form gets submitted and the name and value of the button are send as part of the POST-data. If any other "submit" gets clicked, no names and values are part of the POST-data, not even the name and value of the button. Which makes sense, because it wasn't clicked. >name="foobar button" > value="foobar button" > title="foobar button"> > foobar button > I don't understand what I'm doing wrong, the plain HTML submit-input is pretty much exactly what is documnted elsewhere: > > https://stackoverflow.com/questions/22579616/send-value-of-submit-button-when-form-gets-posted > Jeder Submit-Button hat ein individuelles name-Attribut, mit dem die > Anwendung auf dem Server den Datensatz identifiziert. https://www.mediaevent.de/html/submit.html 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
Re: Wicket can't distinguish multiple submit button in case of one form.
Guten Tag Thorsten Schöning, am Freitag, 26. Juni 2020 um 10:24 schrieben Sie: > My HTML is pretty much the same, only more bloated because of my use > case: I just recognized that Wicket seems to set "name" attributes on inputs differently on runtime than in my HTML, so I added a non-Wicket maintained "submit" again. >name="foobar" > value="foobar" > title="foobar" > /> That button is shown in the UI, can be clicked and submits the form like all the other submit-buttons do. But there's no hint to that name in the URL or POST-data. What should happen in theory? Should "foobar" be part of the POST data? With or without any value? 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
Re: Wicket can't distinguish multiple submit button in case of one form.
Guten Tag Sven Meier, am Donnerstag, 25. Juni 2020 um 23:41 schrieben Sie: > for a normal form submit the browser should send "bcdHistory.upload" as > post parameter. That's what one can read at some places, but my inputs of type "submit" are not POSTed in different browsers. Neither with nor without a "name" attribute. Even the official docs don't use any "name" at all: > > > > My HTML is pretty much the same, only more bloated because of my use case: >method="post" > accept-charset="UTF-8" > wicket:id="realEstates.fmInstallTest"> > [...] > > name="barfoo" > value="Start installation test" > title="Start installation test" > > wicket:message="value:submit.value,title:submit.title" > /> > value="Clear inputs" > title="Clear inputs" > > wicket:message="value:reset.value,title:reset.title" > /> > > > name="hidden_foobar" > value="Upload basic claims data" > /> > name="foobar" > value="Upload basic claims data" > title="Upload basic claims data" > wicket:id="bcdHistory.upload" > > wicket:message="value:bcdHistory.upload.value,title:bcdHistory.upload.title" > /> > [...] > > > "reset" is not send as expected, but neither of the "submit"s are as well. No matter if they contain an explicit "name" or not. I guess because of the URL Wicket forwards to the main form "onSubmit" always, so I didn't recognize any problems in the past. The hidden input OTOH gets instantly POSTed as expected after adding it. I can change names across requests and that is reflected in the POSTed form data instantly as well. I even deleted any web server caches and restarted that regularly already. It additionally doesn't make any difference of both "submit" are Wicket-components are the default one is plain HTML. How should HTML look like that "submit" gets send in the POST-body? 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