You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dmitriy Vsekhvalnov <dv...@gmail.com> on 2011/06/22 14:40:50 UTC

LinkSubmit outside Form

T5.1.0.8

Quick question, fast way to have LinkSubmit outside Form with standard
components?

Thanks.

Re: LinkSubmit outside Form

Posted by Dmitriy Vsekhvalnov <dv...@gmail.com>.
Gentelmen, anyone?

I ended writing clone of LinkSubmit, which detects form on the client and
submits it.

To distinguish what action to trigger i'm encoding <input type="hidded"
name="action" value="my-action" /> when triggering submit, and in the event
handler i have to do switch:

    @CommitAfter
    public Object onSuccess()
    {
        if(action==Delete) doDelete();
        else if (action==Create) doCreate();

        return updateZones();
    }


..which sucks :)   Any idea how to get more clean approach with correct
event triggered?



On Wed, Jun 22, 2011 at 4:40 PM, Dmitriy Vsekhvalnov <dvsekhvalnov@gmail.com
> wrote:

> T5.1.0.8
>
> Quick question, fast way to have LinkSubmit outside Form with standard
> components?
>
> Thanks.
>