Selection lists and unexpected behavior on form submission

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Selection lists and unexpected behavior on form submission

Alexandre Paes
Hi,

In some application i'm working on i have several selection lists inside
a form and whenever i change a value in one of the selection lists i
need to rebuild the contents of all the selection lists, i set the
selection lists with #beSubmitOnChange and set the #defaultAction: on
the form. But the problem is that when i change the value of a given
selection list i get a screen refresh but only the callback associated
with the selection is executed instead of the default action block which
i expected would run everytime the form was submitted. Does anyone know
how i can achieve this?


Cheers,

Alexandre
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Selection lists and unexpected behavior on form submission

Lukas Renggli
> the form. But the problem is that when i change the value of a given
> selection list i get a screen refresh but only the callback associated
> with the selection is executed instead of the default action block which
> i expected would run everytime the form was submitted.

The default action gets evaluated whenever the user presses submits
the form by pressing enter without having the focus on a specific
submit-button.

> Does anyone know
> how i can achieve this?

With the callback of a hidden-input field.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Selection lists and unexpected behavior on form submission

Alexandre Paes
Thanks Lukas,

If i understand it correctly though i should add that hidden as last
field on the form or at least after all the input fields that i need to
use in rebuilding my lists, is this correct?

Cheers,

Alexandre

Lukas Renggli wrote:

>> the form. But the problem is that when i change the value of a given
>> selection list i get a screen refresh but only the callback associated
>> with the selection is executed instead of the default action block which
>> i expected would run everytime the form was submitted.
>
> The default action gets evaluated whenever the user presses submits
> the form by pressing enter without having the focus on a specific
> submit-button.
>
>> Does anyone know
>> how i can achieve this?
>
> With the callback of a hidden-input field.
>
> Lukas
>

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Selection lists and unexpected behavior on form submission

Lukas Renggli
> If i understand it correctly though i should add that hidden as last
> field on the form or at least after all the input fields that i need to
> use in rebuilding my lists, is this correct?

Yes, the input fields callbacks will be evaluated in the order they
appear in the XHTML. Buttons will always be evaluated last, no matter
where they are positioned.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Selection lists and unexpected behavior on form submission

Alexandre Paes
Thanks again Lukas, that works somwehat like i thought it would, i did
like you said and it now works as desired. Thanks for the help.


Alexandre


Lukas Renggli wrote:

>> If i understand it correctly though i should add that hidden as last
>> field on the form or at least after all the input fields that i need to
>> use in rebuilding my lists, is this correct?
>
> Yes, the input fields callbacks will be evaluated in the order they
> appear in the XHTML. Buttons will always be evaluated last, no matter
> where they are positioned.
>
> Cheers,
> Lukas
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside