On Mon, Sep 28, 2009 at 10:36 PM, Juan E. Maya <maya.j...@gmail.com> wrote: > > Look for Double submit handling on > http://www.laliluna.de/tapestry-webframework-evaluation-test.html > That's is probably what u need then
oh,i'd saw it..but it used submit id to prevent user from double submit.. and my question is not double submit,only is a re-submit.. sorry,let me make more clear: double submit would happed before response page returned after form was submitted. my re-submit would happed after response page was rendered,this time user counld re-click submit without modify anything,so that server will get 2 same data submit and save 2 same data(primary key value is different) in the database. > > On Mon, Sep 28, 2009 at 3:32 PM, cleverpig <greatclever...@gmail.com> wrote: > > hi,Juan! > > > > thank for your reply! i saw the mixin you finger out. :) > > but i will find a generic way to protect user from resubmit the data > > in next turn,just not double click in one time. > > > > 2009/9/28 Juan E. Maya <maya.j...@gmail.com>: > >> Jumpstart has Mixin to avoud double click problems. > >> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/javascript/creatingmixins1 > >> > >> Also Sebastian sent on the past days a solution that doesn't use Javascript > >> > >> On Mon, Sep 28, 2009 at 4:52 AM, cleverpig <greatclever...@gmail.com> > >> wrote: > >>> hi,dear buddies! > >>> > >>> I had a bean edit form to save my entity,and added div by using ajax > >>> zone to show what's the submit response. > >>> such as: > >>> ... > >>> <t:beaneditform t:id="scripEditForm" > >>> object="s" > >>> exclude="id" > >>> t:submitLabel="save" > >>> t:zone="response"> > >>> </t:parameter>> > >>> </t:beaneditform> > >>> <div t:type="zone" t:id="response"></div> > >>> ... > >>> after the form submit,response div would display this text:"ok,data > >>> was saved!". it works normally. > >>> but here is a tricky trap:after submit,the submit button still hold > >>> enabled status,so user can reclick it to submit the same data to > >>> server. > >>> > >>> so i think there are some way to skip this trap: > >>> 1.don't use ajax zone,and return to redirect-after-response mode,this > >>> edit form will post data and redirect to list page when data was > >>> saved. > >>> 2.change the submit button's status to disabled and display a return > >>> link in the response div. > >>> > >>> the first way is unusually. > >>> the second way would get some script to control button status,i can't > >>> get way to handle this in beanEditForm,can you give me some help? > >>> > >>> -- > >>> cleverpig(Dan) > >>> Location: Beijing > >>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China > >>> Zipcode: 100031 > >>> MSN: great_liu...@hotmail.com > >>> QQ: 149291732 > >>> Skype: cleverpigatmatrix > >>> Facebook ID:cleverpig > >>> Blog: www.cleverpig.name > >>> Tags: del.icio.us/cleverpig > >>> Twitter: twitter.com/cleverpig > >>> 新浪微博: t.sina.com.cn/cleverpig > >>> Organization: www.beijing-open-party.org > >>> or...@facebook: http://www.facebook.com/group.php?gid=8159558294 > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>> > >>> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > >> > > > > > > > > -- > > cleverpig(Dan) > > Location: Beijing > > Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China > > Zipcode: 100031 > > MSN: great_liu...@hotmail.com > > QQ: 149291732 > > Skype: cleverpigatmatrix > > Facebook ID:cleverpig > > Blog: www.cleverpig.name > > Tags: del.icio.us/cleverpig > > Twitter: twitter.com/cleverpig > > 新浪微博: t.sina.com.cn/cleverpig > > Organization: www.beijing-open-party.org > > or...@facebook: http://www.facebook.com/group.php?gid=8159558294 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: www.cleverpig.name Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org