> On 08 Oct 2016, at 00:11, Paul Hoadley <[email protected]> wrote:
> On 8 Oct 2016, at 8:10 AM, Riccardo De Menna <[email protected]> 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 a null page with that…


My direct action scenario is like the following...

public WOActionResults performActionNamed(String anActionName) {
    languageSetup();
    return super.performActionNamed(anActionName);
}

public void languageSetup() {
    Session s = session();
    if ( s != null ) {
        s.takeLanguageFromRequest(request()); // Method that looks for language 
parameters in different ways (URL, Cookies, Browser, Geolocalization ecc)
    }
}

public WOActionResults languageAction() {
    return context().page();
}

Is there anything wrong in this setup?

regards,
Riccardo


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to