Example usage for com.vaadin.server VaadinPortletService getCurrentRequest

List of usage examples for com.vaadin.server VaadinPortletService getCurrentRequest

Introduction

In this page you can find the example usage for com.vaadin.server VaadinPortletService getCurrentRequest.

Prototype

public static VaadinPortletRequest getCurrentRequest() 

Source Link

Document

Gets the currently processed Vaadin portlet request.

Usage

From source file:de.unioninvestment.eai.portal.portlet.crud.mvp.presenters.configuration.PortletConfigurationPresenter.java

License:Apache License

/**
 * //from ww  w  .j av a 2 s .  c o m
 * @param portletConfigurationView
 *            die View
 * @param configurationService
 *            Service Bean fr die Portletkonfiguration.
 * @param eventBus
 *            fr applikationsweites Eventhandler.
 * @param settings
 */
public PortletConfigurationPresenter(PortletConfigurationView portletConfigurationView,
        ConfigurationService configurationService, EventBus eventBus, Settings settings) {

    super(portletConfigurationView);
    this.configurationService = configurationService;
    this.eventBus = eventBus;
    this.settings = settings;
    this.receiver = new ConfigurationReceiver();
    getView().getUpload().setReceiver(receiver);
    getView().getUpload().addFinishedListener(new ConfigUploadFinishedListener());
    getView().getUploadVcsButton().addClickListener(new ConfigUploadVcsFinishedListener());

    LiferayUI app = LiferayUI.getCurrent();
    VaadinRequest request = VaadinPortletService.getCurrentRequest();

    portletId = app.getPortletId();
    communityId = app.getCommunityId();
    currentUsername = request.getRemoteUser();

    initStatus();
}