[Seaside] Re: Multiple submit buttons/links?

Carl Gundel carlg at libertybasic.com
Sat Jun 17 12:55:35 UTC 2006

> How can I create more than one button or link on a page that causes the
> callbacks to be invoked for each component, even for pages that are
> of one or more non-nested forms?  Is there a simple way provided in the
> framework?

Well, with some spelunking we managed to find
#anchorWithAction:text:submitFormNamed: which lets us have multiple anchors
and each can cause a submit.  These are links but using CSS we can make the
links look like buttons.

    html attributes name: #activeStuff.
    html form:
        [ html textInputWithCallback: [:value | self name: value].
            "here is a nested form which also has an anchor"
            super renderContentOn: html].
        anchorWithAction: [self doThis ]
        text: 'this text'
        submitFormNamed: #activeStuff.
        anchorWithAction: [self doThat ]
        text: 'that text'
        submitFormNamed: #activeStuff.

Problem solved.  I hope this helps somebody.  :-)

-Carl Gundel, author of Liberty BASIC

More information about the Seaside mailing list