[Seaside] Problem with form submit half working
Todd Blanchard
tblanchard at mac.com
Sun Nov 27 11:07:23 CET 2005
This is really odd. I have a component with a little login form -
email address and password with a submit button. I registered a
callback on the form. If I type stuff into the fields and hit
return, the form submits and the action is performed as I expect. If
I type stuff in and click on the submit button, the password field is
cleared and my action isn't performed (I replace the component with a
set of advanced options and a logout button - this doesn't happen
when the submit button is used but does happen when I hit return).
I'm completely baffled and I'm sure this is something boneheaded on
my part.
Generated html looks like this:
<form method="post">
<input value="default" src="/seaside/blog?_s=AcXgiilMgjqAKEWV"
name="21" class="image" width="1" height="1" type="image" />
<div class="labeled-field">Email address:
<input name="22" class="text" size="20" value="" type="text" />
</div>
<div class="labeled-field">Password:
<input name="23" class="password" size="20" type="password" />
</div>
<div class="labeled-field">
<input class="submit" type="submit" />
</div>
<input name="_s" class="hidden" value="tpanIqWCsPxApuZH"
type="hidden" />
<input name="_k" class="hidden" value="XlPikqHZ" type="hidden" />
</form>
render code:
(html form defaultAction: [self login]) with:
[
self errorMessage isNil ifFalse:
[
((html div class: 'labeled-field') id: 'login-error')
with: [html text: self errorMessage].
].
(html div class: 'labeled-field')
with: [((html text: 'Email address: ')textInput size: 20)
on:#email of: self].
(html div class: 'labeled-field')
with: [((html text: 'Password: ')passwordInput size: 20)
callback:[:pw | password := pw]].
(html div class: 'labeled-field')
with: [html submitButton].
]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://liststest.squeakfoundation.org/pipermail/seaside/attachments/20051127/441de98d/attachment-0001.htm
More information about the Seaside
mailing list