Closed hlship closed 14 years ago
This appears to happen in Chrome and FF.
The request comes up very oddly:
GET /confirmpac/undefined HTTP/1.1
Host: localhost:8080
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4
Referer: http://localhost:8080/confirmpac/1
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: JSESSIONID=1s5f6uwg5ae18
The rendered HTML looks fine:
<form onsubmit="javascript:return Tapestry.waitForPage(event);" action="/confirmpac.form" method="post" id="form"><div class="t-invisible"><input value="1" name="t:ac" type="hidden"></input><input value="H4sIAAAAAAAAAFvzloG1XIxBxDk/Ly2zKDcgMdkqMy+5KDU3Na+kuIjBIb8oXS+xIDE5I1WvJLEgtbikqNJULzm/KDUnMwlI5xbk54FU6gWXJuVmlqgEFOUnpxYXg3nFxZn5eTODP0lu3dLizMTA5MPAkZyTCVTtmVLCIOSTlViWqJ+TmJeuH1xSlJmXbu3DwJ2aA7bYLzE3tZChjoGxoqCEgRPuHmQ2ALpXX4S4AAAA" name="t:formdata" type="hidden"></input></div><input value="Increment Value" id="increment" name="increment" type="submit"></input></form>
That's what's wierd: action="/confirmpac.form" and there's nothing special going on with the Form (no client-side validation, etc.) I just don't see where "/confirmpac/undefined" can be coming from!
Ah, I think I found it. The logic for handling an element with a click handler, but no Tapestry action, was missing a return, causing the window.location to be updated as well. Yowza!
Fix confirm.js to handle the case where a submit (with no Tapestry action) is triggered
Closed by 6947f4dff92c985e9d85df3f37acdf9c1ccdbe3f
My page has a numeric page activation context (a Hibernate entity id). This shows up in the form:
However, when the form is submitted, after the confirm dialog, the form submits, but the redirect URL after submission is /confirmbid/undefined