Search in sources :

Example 1 with ERXRedirect

use of er.extensions.appserver.ERXRedirect in project wonder-slim by undur.

the class AjaxUtils method redirectTo.

/**
 * Creates (or modifies if already created) an AjaxResponse to redirect to the passed component with a component action.
 * Anything previously written to the AjaxResponse is preserved.
 *
 * @param component full page WOComponent instance to redirect to
 */
public static void redirectTo(WOComponent component) {
    WOContext context = component.context();
    ERXRedirect redirect = (ERXRedirect) component.pageWithName(ERXRedirect.class.getName());
    redirect.setComponent(component);
    redirect.appendToResponse(AjaxUtils.createResponse(context.request(), context), context);
}
Also used : ERXRedirect(er.extensions.appserver.ERXRedirect) WOContext(com.webobjects.appserver.WOContext)

Aggregations

WOContext (com.webobjects.appserver.WOContext)1 ERXRedirect (er.extensions.appserver.ERXRedirect)1