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
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/
__
> 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
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:
> 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