[Seaside] Form action problem (and defaultAction not working at all)

Ryan Simmons ryan.craig.simmons at gmail.com
Tue Jul 17 05:57:31 UTC 2012


A hidden input inside the form with a callback should provide that kind of
behaviour.
Something like
html form with: [ html table: [ .......]...
                html hiddenInput
                       callback: [:v | self halt]].


On 17 July 2012 02:20, Sebastian Sastre <sebastian at flowingconcept.com>wrote:

> you're right Julian, I was expecting to have the default action executed
> also when the submit button is pressed.
>
> It's not a bug but my broken expectation.
>
> So the problem for the app now is about getting a callback executed when
> submitting the form via javascript ala
>
> $('#blahForm').submit()
>
> after some js validation
>
> hmm…
>
> sebastian <https://about.me/sebastianconcept>
>
> o/
>
>
>
>
>
> On Jul 16, 2012, at 7:22 PM, Julian Fitzell wrote:
>
> I wonder if you are simply misunderstand what #defaultAction: does... the
> default action is only triggered when the user submits the form by pressing
> Return in a text field.
>
> The test at
> http://localhost:8080/tests/functional/WACallbackFunctionalTest seems to
> be working fine. Click in the text box and press return and you'll see the
> default action callback is being executed.
>
> All forms on the page will have the same action key, just as all links
> have the same base URL. Only the names of the parameters (whether form
> inputs or url parameters) change. the _k refers to the page/continuation
> that generated the callbacks, so it should usually be the same for
> everything on a single rendered page.
>
> Julian
>
> On Mon, Jul 16, 2012 at 10:41 PM, Sebastian Sastre <
> sebastian at flowingconcept.com> wrote:
>
>> Hi there,
>>
>> I've loaded Seaside 3.0.7.1 on Pharo 1.4 and the forms action issue is
>> still there.
>>
>> I am missing a patch or is still an open issue?
>>
>> how are you guys getting X action executed when the user press enter in a
>> form?
>>
>>  sebastian <https://about.me/sebastianconcept>
>>
>> o/
>>
>> PD: to reproduce the problem you can
>> 1. go to WAHtml5InputTest
>> 2. set a default action like this:
>> html form defaultAction:[self halt]; with: [ html table: [
>> ….
>>
>> 3. browse http://localhost:8080/tests/functional/WAHtml5InputTest and submit
>> the form
>>
>> there are 2 problems:
>> 1. you never get the default action executed
>> 2. there are 2 forms in that page and they have the same action key which
>> makes no sense
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120717/c4a36f25/attachment.htm


More information about the seaside mailing list