Return current page with direct actions

2016-10-07 Thread Riccardo De Menna
Hi Everyone, I have a question that I hope has a trivial answer. I want to implement a simple language switch via direct actions but I don’t want the user to be returned to the default page of the website but rather stay where they are. With component actions I simply return null but how do I re

Re: Return current page with direct actions

2016-10-07 Thread Paul Hoadley
On 8 Oct 2016, at 8:10 AM, Riccardo De Menna wrote: > With component actions I simply return null but how do I return the current > page with direct actions? You should have access to context().page(). Does that achieve what you want? -- Paul Hoadley http://logicsquad.net/ __

Re: Return current page with direct actions

2016-10-07 Thread Riccardo De Menna
> On 08 Oct 2016, at 00:11, Paul Hoadley wrote: > On 8 Oct 2016, at 8:10 AM, Riccardo De Menna wrote: >> With component actions I simply return null but how do I return the current >> page with direct actions? > You should have access to context().page(). Does that achieve what you want? I get

Re: Return current page with direct actions

2016-10-07 Thread Ramsey Gurley
On the previous page that triggers the direct action, add the context id. Then in the direct action String cid = context().request().stringFormValueForKey(“ctxKey”); if(cid != null) return session().restorePageForContextID(cid); On Oct 7, 2016, at 3:38 PM, Riccardo De Menna wrote:

Re: Return current page with direct actions

2016-10-08 Thread Riccardo De Menna
> On 08 Oct 2016, at 00:58, Ramsey Gurley wrote: > > On the previous page that triggers the direct action, add the context id. > > >?ctxKey=$context.contextID/> > > > Then in the direct action > > String cid = context().request().stringFormValueForKey(“ctxKey”); > if(cid != null) re