[Seaside] trouble with submit buttons
Julian Fitzell
julian at beta4.com
Tue Aug 2 18:42:27 CEST 2005
I'll just throw in that you don't need to use a submit button with an
action in this case. Just #submitButtonWithText: would suffice to have
the form submitted so your callbacks will take place.
Cheers,
Julian
Mart-Mari Breedt wrote:
> I figured it out. It is the classical form inside form problem. The
> parent component had a form tag enclosing the contents.
>
>
>
> Thanks,
>
> Mart-Mari
>
>
>
> ------------------------------------------------------------------------
>
> *From:* Mart-Mari Breedt
> *Sent:* 02 Augustus 2005 11:20
> *To:* The Squeak Enterprise Aubergines Server - general discussion.
> *Subject:* [Seaside] trouble with submit buttons
>
>
>
> Hi,
>
>
>
> I have a child component that can populate a list containing various
> items. The rendering selectors look something like this:
>
>
>
> html form: [
>
> html
>
> text: 'Select value';
>
> space;
>
> selectFromList: items asArray
>
> selected: items asArray first
>
> callback: [:value |
>
> items add: value.
>
> ];
>
> space;
>
> submitButtonWithAction: [] text: 'Add'.
>
> ]
>
>
>
> Or
>
>
>
> html form: [
>
> html
>
> textInputWithValue: 'None’
>
> callback: [:value |
>
> (value isValid)
>
> ifTrue: [
>
>
> items add: value.
>
> ]
>
> ifFalse: [
> self inform: 'The value you have entered is not valid.' ]
>
> ];
>
> submitButtonWithAction: [] text: 'Add'
>
> ]
>
>
>
> I need to include the submit button in this fashion, since the callback
> doesn’t take place until the submit button has been clicked.
>
>
>
> On its own this component works fine, but as soon as I make it part of a
> parent component by calling “html render: component” on it, clicking on
> the submit button causes the whole website to expiry and return to start.
>
>
>
> What am I doing wrong?
>
>
>
> Thanks,
>
> Mart-Mari
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
--
Julian Fitzell -- Beta4 Productions
julian at beta4.com -- http://www.beta4.com
Seaside: http://seaside.st/
More information about the Seaside
mailing list