You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Dan Bachelder <ch...@chowda.net> on 2001/11/11 01:23:55 UTC

duh

okay.. this is maybe a bit basic.. but i can't seem to figure out how i get
the url to change after an action so that a refresh wont cause the action to
be called again... setRedirect doesn't quite cut it.. unless there is
something I am missing there too...



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: duh

Posted by Dan Bachelder <ch...@chowda.net>.
thanks.. that seems to work.. i'd worked around it by using Jason's
suggestion and using a redirect  to a DoNothing action.. So I got the
correct page and a "safe" url.. all my other actions are in popup windows
that close when the action is commited.. so i haven't had to deal with this
before...

----- Original Message -----
From: "Scott Eade" <se...@backstagetech.com.au>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Saturday, November 10, 2001 8:52 PM
Subject: Re: duh


> Assuming you have a form, how about including:
>
>     <input type="hidden" name="_session_access_counter"
> value="$data.User.AccessCounterForSession" />
>
> in it and then TemplateSessionValidator should take
> care of things for you.
>
> Check the dev list for a patch I posted a couple
> of days ago.
>
> HTH
>
> Scott
>
>
> ----- Original Message -----
> From: "Dan Bachelder" <ch...@chowda.net>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Sunday, November 11, 2001 11:56 AM
> Subject: Re: duh
>
>
> > I got that part... but when the user refreshes what appears to be
> > "newpage.vm" the url has "action/myAction" in it still when i would
prefer
> > it to say "template/newpage.vm"...
> >
> > ----- Original Message -----
> > From: "Jason van Zyl" <jv...@zenplex.com>
> > To: "Turbine Users List" <tu...@jakarta.apache.org>
> > Sent: Saturday, November 10, 2001 7:50 PM
> > Subject: Re: duh
> >
> >
> > > On 11/10/01 7:23 PM, "Dan Bachelder" <ch...@chowda.net> wrote:
> > >
> > > > okay.. this is maybe a bit basic.. but i can't seem to figure out
how
> i
> > get
> > > > the url to change after an action so that a refresh wont cause the
> > action to
> > > > be called again... setRedirect doesn't quite cut it.. unless there
is
> > > > something I am missing there too...
> > >
> > > In VelocityAction:
> > >
> > > public void setTemplate(RunData data, String template)
> > >
> > > So in your action:
> > >
> > > setTemplate(data, "newPage.vm");
> > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > > --
> > >
> > > jvz.
> > >
> > > Jason van Zyl
> > >
> > > http://tambora.zenplex.org
> > > http://jakarta.apache.org/turbine
> > > http://jakarta.apache.org/velocity
> > > http://jakarta.apache.org/alexandria
> > > http://jakarta.apache.org/commons
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: duh

Posted by Scott Eade <se...@backstagetech.com.au>.
Assuming you have a form, how about including:

    <input type="hidden" name="_session_access_counter"
value="$data.User.AccessCounterForSession" />

in it and then TemplateSessionValidator should take
care of things for you.

Check the dev list for a patch I posted a couple
of days ago.

HTH

Scott


----- Original Message -----
From: "Dan Bachelder" <ch...@chowda.net>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Sunday, November 11, 2001 11:56 AM
Subject: Re: duh


> I got that part... but when the user refreshes what appears to be
> "newpage.vm" the url has "action/myAction" in it still when i would prefer
> it to say "template/newpage.vm"...
>
> ----- Original Message -----
> From: "Jason van Zyl" <jv...@zenplex.com>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Saturday, November 10, 2001 7:50 PM
> Subject: Re: duh
>
>
> > On 11/10/01 7:23 PM, "Dan Bachelder" <ch...@chowda.net> wrote:
> >
> > > okay.. this is maybe a bit basic.. but i can't seem to figure out how
i
> get
> > > the url to change after an action so that a refresh wont cause the
> action to
> > > be called again... setRedirect doesn't quite cut it.. unless there is
> > > something I am missing there too...
> >
> > In VelocityAction:
> >
> > public void setTemplate(RunData data, String template)
> >
> > So in your action:
> >
> > setTemplate(data, "newPage.vm");
> >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> > --
> >
> > jvz.
> >
> > Jason van Zyl
> >
> > http://tambora.zenplex.org
> > http://jakarta.apache.org/turbine
> > http://jakarta.apache.org/velocity
> > http://jakarta.apache.org/alexandria
> > http://jakarta.apache.org/commons
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: duh

Posted by Dan Bachelder <ch...@chowda.net>.
I got that part... but when the user refreshes what appears to be
"newpage.vm" the url has "action/myAction" in it still when i would prefer
it to say "template/newpage.vm"...

----- Original Message -----
From: "Jason van Zyl" <jv...@zenplex.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Saturday, November 10, 2001 7:50 PM
Subject: Re: duh


> On 11/10/01 7:23 PM, "Dan Bachelder" <ch...@chowda.net> wrote:
>
> > okay.. this is maybe a bit basic.. but i can't seem to figure out how i
get
> > the url to change after an action so that a refresh wont cause the
action to
> > be called again... setRedirect doesn't quite cut it.. unless there is
> > something I am missing there too...
>
> In VelocityAction:
>
> public void setTemplate(RunData data, String template)
>
> So in your action:
>
> setTemplate(data, "newPage.vm");
>
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> --
>
> jvz.
>
> Jason van Zyl
>
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: duh

Posted by Jason van Zyl <jv...@zenplex.com>.
On 11/10/01 7:23 PM, "Dan Bachelder" <ch...@chowda.net> wrote:

> okay.. this is maybe a bit basic.. but i can't seem to figure out how i get
> the url to change after an action so that a refresh wont cause the action to
> be called again... setRedirect doesn't quite cut it.. unless there is
> something I am missing there too...

In VelocityAction:

public void setTemplate(RunData data, String template)

So in your action:

setTemplate(data, "newPage.vm");
 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>