com.vaadin.ui.UI.getNavigator()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(211)

本文整理了Java中com.vaadin.ui.UI.getNavigator()方法的一些代码示例,展示了UI.getNavigator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UI.getNavigator()方法的具体详情如下:
包路径:com.vaadin.ui.UI
类名称:UI
方法名:getNavigator

UI.getNavigator介绍

[英]Returns the navigator attached to this UI or null if there is no navigator.
[中]返回附加到此UI的导航器,如果没有导航器,则返回null。

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

Navigator navigator = getNavigator();
if (navigator != null) {

代码示例来源:origin: stackoverflow.com

class Presenter {
 FirstView firstView;
 SecondView secondView;
 public Presenter (FirstView firstView, SecondView secondView) {
  this.firstView = firstView;
  this.secondView = secondView;
 }
 public void goClicked(UI ui) {
   secondView.label.setValue(firstView.text.getValue());
   ui.getNavigator().navigateTo(MyprojectUI.SECOND_VIEW);
 }
}

代码示例来源:origin: com.vaadin/vaadin-server

Navigator navigator = getNavigator();
if (navigator != null) {
  navigator.navigateTo(navigator.getState());

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

/**
 * Constructor for BaseUIEvent
 */
public BaseUIEvent() {
  this.source = UI.getCurrent().getNavigator().getCurrentView().getClass();
}

代码示例来源:origin: peholmst/vaadin4spring

@Override
public void attach() {
  super.attach();
  if (getUI().getNavigator() == null) {
    throw new IllegalStateException("Please configure the Navigator before you attach the SideBar to the UI");
  }
  getUI().getNavigator().addViewChangeListener(this);
}

代码示例来源:origin: peholmst/vaadin4spring

@Override
public void attach() {
  super.attach();
  if (getUI().getNavigator() == null) {
    throw new IllegalStateException("Please configure the Navigator before you attach the SideBar to the UI");
  }
  getUI().getNavigator().addViewChangeListener(this);
}

代码示例来源:origin: peholmst/vaadin4spring

@Override
  public void itemInvoked(UI ui) {
    ui.getNavigator().navigateTo(vaadinView.name());
  }
}

代码示例来源:origin: peholmst/vaadin4spring

@Override
  public void buttonClick(Button.ClickEvent event) {
    getUI().getNavigator().navigateTo(viewName);
  }
});

代码示例来源:origin: com.github.markash/components

@SuppressWarnings("serial")
private NotificationsButton(
    final NotificationsModel notifications,
    final String notificationsView) {
  this(
      notifications,
      (ClickListener) event -> UI.getCurrent().getNavigator().navigateTo(notificationsView)
  );
}

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

@Override
  public void itemClick(ItemClickEvent event)
  {
    this.viewContext.setCurrentView("principalManagementPanel");
    
    UI.getCurrent().getNavigator().navigateTo("principalManagementPanel");
  }
}

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

@Override
  public void buttonClick(final ClickEvent event) 
  {
    loadTopLevelNavigator();
    UI.getCurrent().getNavigator().navigateTo("landingView");
  }
});

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

@Override
  public void buttonClick(final ClickEvent event)
  {
    loadTopLevelNavigator();
    UI.getCurrent().getNavigator().navigateTo("housekeepingView");
  }
});

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

@Override
  public void buttonClick(final ClickEvent event) 
  {
    loadTopLevelNavigator();
    UI.getCurrent().getNavigator().navigateTo("policyManagementPanel");
  }
});

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

@Override
  public void buttonClick(final ClickEvent event) 
  {
    loadTopLevelNavigator();
    UI.getCurrent().getNavigator().navigateTo("platformConfigurationView");
  }
});

代码示例来源:origin: peholmst/vaadin4spring

@Override
public void detach() {
  getUI().getNavigator().removeViewChangeListener(this);
  super.detach();
}

代码示例来源:origin: peholmst/vaadin4spring

@Override
public void detach() {
  getUI().getNavigator().removeViewChangeListener(this);
  super.detach();
}

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

@Override
  public void buttonClick(final ClickEvent event) 
  {
    loadTopLevelNavigator();
    UI.getCurrent().getNavigator().navigateTo("principalManagementPanel");
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    UI.getCurrent().getNavigator().addViewChangeListener(HeaderLayout.this);
    UI.getCurrent().getNavigator().navigateTo("dashboard/" + m_nativeSelect.getContainerProperty(m_nativeSelect.getValue(), "title").getValue());
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public void buttonClick(Button.ClickEvent event) {
    UI.getCurrent().getNavigator().addViewChangeListener(HeaderLayout.this);
    UI.getCurrent().getNavigator().navigateTo("wallboard/" + m_nativeSelect.getContainerProperty(m_nativeSelect.getValue(), "title").getValue());
  }
});

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

public void windowClose(CloseEvent e) 
  {
    if((IkasanAuthentication)VaadinService.getCurrentRequest().getWrappedSession()
         .getAttribute(DashboardSessionValueConstants.USER) == null)
    {
      UI.getCurrent().getNavigator().navigateTo("landingView"); 
      
      Notification.show("You cannot access this page!", Type.ERROR_MESSAGE);
    }
  }
});

相关文章