You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hottois Ludwig <lu...@worldline.com> on 2013/11/20 16:22:52 UTC

[T5.3] How to submit a form in a sub component and have a callback ?

Hi everyone !

I'm surprised, but after some search in the mail archives, it seems that nobody had asked this kind of question....

I've a form in a sub component (itself in a sub component), and i have to validate and submit my form via a click on a button located in my page.

I've tried a lot of ways, like use @Environmental ValidationTracker or FormSupport for trying, but with no success.

So i've decided to do this:

        ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
            public void run(JavaScriptSupport support) {
                support.addScript("document.getElementById('"foobarSubmitButton"').click();");
            }
        });

And it works ... buuut i've no callback for knowing when the validate and success part of this submission is ended ... and it's really dirty.

So i ask to you who are geniuses :) , what do you think be the best way to submit a form in a sub sub sub component via a Far away component or the top page, with a control of the validation process ( because i have to know when it's finish)

I know this could be boring for you, but at least, i've tried a lot before asking :)

Ludwig HOTTOIS
Retail & Industry - AuchanDirect.fr
Tél. +33(0)3 20 60 93 83
Mail ludwig.hottois@atos.net<ma...@atos.net>
Web atosworldline.com<http://atosworldline.com/>
ZI La Pointe - 59113 SECLIN (FR)
[cid:image002.gif@01CEE60B.F0390320]


________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

RE: [T5.3] How to submit a form in a sub component and have a callback ?

Posted by Hottois Ludwig <lu...@worldline.com>.
Thanks for the tip, i'm going to see that :)

-----Message d'origine-----
De : Nicolas Barrera [mailto:nbarrera@gmail.com]
Envoyé : mercredi 20 novembre 2013 17:37
À : Tapestry users
Objet : Re: [T5.3] How to submit a form in a sub component and have a callback ?

Sorry, I 'm in a hurry so I 'll write short...

Have you looked for information on submitNotifier?

it's like a pub/sub on the submit event, take a look.

cheers

Nicolás.-


On Wed, Nov 20, 2013 at 12:22 PM, Hottois Ludwig < ludwig.hottois@worldline.com> wrote:

>  Hi everyone !
>
>
>
> I'm surprised, but after some search in the mail archives, it seems
> that nobody had asked this kind of question....
>
>
>
> I've a form in a sub component (itself in a sub component), and i have
> to validate and submit my form via a click on a button located in my page.
>
>
>
> I've tried a lot of ways, like use @Environmental ValidationTracker or
> FormSupport for trying, but with no success.
>
>
>
> So i've decided to do this:
>
>
>
>         ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>
>             public void run(JavaScriptSupport support) {
>
>
> support.addScript("document.getElementById('"foobarSubmitButton"').cli
> ck();");
>
>             }
>
>         });
>
>
>
> And it works ... buuut i've no callback for knowing when the validate
> and success part of this submission is ended ... and it's really dirty.
>
>
>
> So i ask to you who are geniuses :) , what do you think be the best
> way to submit a form in a sub sub sub component via a Far away
> component or the top page, with a control of the validation process (
> because i have to know when it's finish)
>
>
>
> I know this could be boring for you, but at least, i've tried a lot
> before asking J
>
> [image: Description : blue_strip]
> *Ludwig HOTTOIS*
>
> Retail & Industry - AuchanDirect.fr
>
> Tél. +33(0)3 20 60 93 83
> Mail ludwig.hottois@atos.net
> Web atosworldline.com
>
> ZI La Pointe - 59113 SECLIN (FR)
> [image: Description : Atos Worldline logo]
>
>
>
> ------------------------------
>
> Ce message et les pièces jointes sont confidentiels et réservés à
> l'usage exclusif de ses destinataires. Il peut également être protégé
> par le secret professionnel. Si vous recevez ce message par erreur,
> merci d'en avertir immédiatement l'expéditeur et de le détruire.
> L'intégrité du message ne pouvant être assurée sur Internet, la
> responsabilité de Worldline ne pourra être recherchée quant au contenu
> de ce message. Bien que les meilleurs efforts soient faits pour
> maintenir cette transmission exempte de tout virus, l'expéditeur ne
> donne aucune garantie à cet égard et sa responsabilité ne saurait être
> recherchée pour tout dommage résultant d'un virus transmis.
>
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy
> it. As its integrity cannot be secured on the Internet, the Worldline
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
>


Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.3] How to submit a form in a sub component and have a callback ?

Posted by Nicolas Barrera <nb...@gmail.com>.
Sorry, I 'm in a hurry so I 'll write short...

Have you looked for information on submitNotifier?

it's like a pub/sub on the submit event, take a look.

cheers

Nicolás.-


On Wed, Nov 20, 2013 at 12:22 PM, Hottois Ludwig <
ludwig.hottois@worldline.com> wrote:

>  Hi everyone !
>
>
>
> I’m surprised, but after some search in the mail archives, it seems that
> nobody had asked this kind of question….
>
>
>
> I’ve a form in a sub component (itself in a sub component), and i have to
> validate and submit my form via a click on a button located in my page.
>
>
>
> I’ve tried a lot of ways, like use @Environmental ValidationTracker or
> FormSupport for trying, but with no success.
>
>
>
> So i’ve decided to do this:
>
>
>
>         ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>
>             public void run(JavaScriptSupport support) {
>
>
> support.addScript("document.getElementById('"foobarSubmitButton"').click();");
>
>             }
>
>         });
>
>
>
> And it works … buuut i’ve no callback for knowing when the validate and
> success part of this submission is ended … and it’s really dirty.
>
>
>
> So i ask to you who are geniuses :) , what do you think be the best way to
> submit a form in a sub sub sub component via a Far away component or the
> top page, with a control of the validation process ( because i have to know
> when it’s finish)
>
>
>
> I know this could be boring for you, but at least, i’ve tried a lot before
> asking J
>
> [image: Description : blue_strip]
> *Ludwig HOTTOIS*
>
> Retail & Industry - AuchanDirect.fr
>
> Tél. +33(0)3 20 60 93 83
> Mail ludwig.hottois@atos.net
> Web atosworldline.com
>
> ZI La Pointe - 59113 SECLIN (FR)
> [image: Description : Atos Worldline logo]
>
>
>
> ------------------------------
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage
> exclusif de ses destinataires. Il peut également être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
> pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra
> être recherchée quant au contenu de ce message. Bien que les meilleurs
> efforts soient faits pour maintenir cette transmission exempte de tout
> virus, l'expéditeur ne donne aucune garantie à cet égard et sa
> responsabilité ne saurait être recherchée pour tout dommage résultant d'un
> virus transmis.
>
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive this
> e-mail in error, please notify the sender immediately and destroy it. As
> its integrity cannot be secured on the Internet, the Worldline liability
> cannot be triggered for the message content. Although the sender endeavours
> to maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>