List of usage examples for com.vaadin.server VaadinPortletRequest getPortletRequest
public PortletRequest getPortletRequest()
From source file:org.vaadin.tori.ToriUI.java
License:Apache License
@Override protected void init(final VaadinRequest request) { setId("tori-ui"); setPollInterval(DEFAULT_POLL_INTERVAL); registerRpc(this); ToriApiLoader.init(request);// w w w . j a v a2 s . c om apiLoader = ToriApiLoader.getCurrent(); inputCacheUtil = new InputCacheUtil(); addExtension(inputCacheUtil.getExtension()); checkUrl(); final String trackerId = apiLoader.getDataSource().getConfiguration().getGoogleAnalyticsTrackerId(); if (trackerId != null && !trackerId.isEmpty()) { analytics = new GoogleAnalyticsTracker(trackerId); analytics.setAllowAnchor(true); analytics.extend(ToriUI.this); } mainLayout = new VerticalLayout(); mainLayout.setMargin(false); setContent(mainLayout); VerticalLayout navigatorContent = new VerticalLayout(); setNavigator(new ToriNavigator(navigatorContent)); breadcrumbs = new Breadcrumbs(); addControlPanelIfInDevelopment(); recentBar = new RecentBar(); mainLayout.addComponent(recentBar); mainLayout.addComponent(breadcrumbs); mainLayout.addComponent(navigatorContent); if (request instanceof VaadinPortletRequest) { final VaadinPortletRequest r = (VaadinPortletRequest) request; setPortletMode(r.getPortletRequest().getPortletMode()); } ConfirmDialog.setFactory(ComponentUtil.getConfirmDialogFactory()); }