You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stony Zhang <zh...@cyberobject.com> on 2007/03/26 11:52:51 UTC
Why submit again when click refresh button in IE ?
Hi everyone,
I have a question in T4, that is,
After I submit a form (have sent something to server),
click refresh button in IE, but I find do a submit again!
Anyone can tell me the reason and how to solve it.
Thanks in advance!
Best wishes,
Stony
Re: Why submit again when click refresh button in IE ?
Posted by Huang Gehua <bo...@gmail.com>.
public ILink onSubmit(IRequestCycle cycle) {
//your some codes here
//below is the redirect code.Remember this method must return a
ILinK.
ExternalServiceParameter esp=new
ExternalServiceParameter("member/LeaveWord",new
Object[]{getUserIdBeViewed()});
return this.getExternalService().getLink(false, esp);
}
another example here:
getPageService().getLink(false, "your page path")
for detail look up T4 api
2007/3/26, Pablo Ruggia <pr...@gmail.com>:
>
> You have to implement redirect after post pattern.
> http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
>
>
> On 3/26/07, Stony Zhang <zh...@cyberobject.com> wrote:
> >
> > Hi everyone,
> >
> > I have a question in T4, that is,
> >
> > After I submit a form (have sent something to
> server),
> > click refresh button in IE, but I find do a submit again!
> >
> > Anyone can tell me the reason and how to solve it.
> >
> >
> >
> > Thanks in advance!
> >
> > Best wishes,
> >
> > Stony
> >
> >
>
Re: Why submit again when click refresh button in IE ?
Posted by Thiago H de Paula Figueiredo <th...@terra.com.br>.
On Mon, 26 Mar 2007 09:50:22 -0300, Pablo Ruggia <pr...@gmail.com> wrote:
> No, it is not.
> tapestry-flash is a kind of property persistence.
You're right. I forgot to mention that
http://howardlewisship.com/tapestry-javaforge/tapestry-flash/ also shows
how to use redirect-after-post in Tapestry 4.x, with the flash persistence
helping a lot.
Copied from that URL:
public abstract class MyPage extends BasePage
{
@Persist("flash")
public abstract String getMessage();
public abstract void setMessage(String message);
...
@InjectObject("engine-service:page")
public abstract IEngineService getPageService();
public ILink doFormSubmit()
{
// ... write data to a database
setMessage("Your changes have been saved.");
return getPageService().getLink(false, getPageName());
}
}
> Redirect after post is implemented the way Huang Gehua told, or getting
> the
> page service if your page does not implement the external interface.
>
> On 3/26/07, Thiago H de Paula Figueiredo <th...@terra.com.br> wrote:
>>
>> On Mon, 26 Mar 2007 08:35:04 -0300, Pablo Ruggia <pr...@gmail.com>
>> wrote:
>>
>> > You have to implement redirect after post pattern.
>> >
>> http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
>>
>> Nice reading, but it is already implemented by Howard in tapestry-flash:
>> http://howardlewisship.com/tapestry-javaforge/tapestry-flash/
>>
>> --
>>
>> hasta la vista!!!
>>
>> |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p
>>
>> thiago h. de paula figueiredo
>> mestre em ciência da computação pelo dcc/ufmg
>> ate' porque bobagem pouca e' bobagem . . .
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
--
hasta la vista!!!
|8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p
thiago h. de paula figueiredo
mestre em ciência da computação pelo dcc/ufmg
ate' porque bobagem pouca e' bobagem . . .
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Why submit again when click refresh button in IE ?
Posted by Pablo Ruggia <pr...@gmail.com>.
No, it is not.
tapestry-flash is a kind of property persistence.
Redirect after post is implemented the way Huang Gehua told, or getting the
page service if your page does not implement the external interface.
On 3/26/07, Thiago H de Paula Figueiredo <th...@terra.com.br> wrote:
>
> On Mon, 26 Mar 2007 08:35:04 -0300, Pablo Ruggia <pr...@gmail.com>
> wrote:
>
> > You have to implement redirect after post pattern.
> > http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
>
> Nice reading, but it is already implemented by Howard in tapestry-flash:
> http://howardlewisship.com/tapestry-javaforge/tapestry-flash/
>
> --
>
> hasta la vista!!!
>
> |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p
>
> thiago h. de paula figueiredo
> mestre em ciência da computação pelo dcc/ufmg
> ate' porque bobagem pouca e' bobagem . . .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Why submit again when click refresh button in IE ?
Posted by Thiago H de Paula Figueiredo <th...@terra.com.br>.
On Mon, 26 Mar 2007 08:35:04 -0300, Pablo Ruggia <pr...@gmail.com> wrote:
> You have to implement redirect after post pattern.
> http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
Nice reading, but it is already implemented by Howard in tapestry-flash:
http://howardlewisship.com/tapestry-javaforge/tapestry-flash/
--
hasta la vista!!!
|8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p
thiago h. de paula figueiredo
mestre em ciência da computação pelo dcc/ufmg
ate' porque bobagem pouca e' bobagem . . .
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Why submit again when click refresh button in IE ?
Posted by Pablo Ruggia <pr...@gmail.com>.
You have to implement redirect after post pattern.
http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
On 3/26/07, Stony Zhang <zh...@cyberobject.com> wrote:
>
> Hi everyone,
>
> I have a question in T4, that is,
>
> After I submit a form (have sent something to server),
> click refresh button in IE, but I find do a submit again!
>
> Anyone can tell me the reason and how to solve it.
>
>
>
> Thanks in advance!
>
> Best wishes,
>
> Stony
>
>