Search in sources :

Example 1 with ExternalLinkContext

use of com.haulmont.cuba.web.sys.linkhandling.ExternalLinkContext in project cuba by cuba-platform.

the class LinkHandler method handle.

/**
 * Called to handle the link.
 */
public void handle() {
    try {
        ExternalLinkContext linkContext = new ExternalLinkContext(requestParams, action, app);
        for (LinkHandlerProcessor processor : processors) {
            if (processor.canHandle(linkContext)) {
                processor.handle(linkContext);
                break;
            }
        }
    } finally {
        VaadinRequest request = VaadinService.getCurrentRequest();
        WrappedSession wrappedSession = request.getWrappedSession();
        wrappedSession.removeAttribute(AppUI.LAST_REQUEST_PARAMS_ATTR);
        wrappedSession.removeAttribute(AppUI.LAST_REQUEST_ACTION_ATTR);
    }
}
Also used : LinkHandlerProcessor(com.haulmont.cuba.web.sys.linkhandling.LinkHandlerProcessor) WrappedSession(com.vaadin.server.WrappedSession) VaadinRequest(com.vaadin.server.VaadinRequest) ExternalLinkContext(com.haulmont.cuba.web.sys.linkhandling.ExternalLinkContext)

Aggregations

ExternalLinkContext (com.haulmont.cuba.web.sys.linkhandling.ExternalLinkContext)1 LinkHandlerProcessor (com.haulmont.cuba.web.sys.linkhandling.LinkHandlerProcessor)1 VaadinRequest (com.vaadin.server.VaadinRequest)1 WrappedSession (com.vaadin.server.WrappedSession)1