com.vaadin.flow.router.Route.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(126)

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

Route.<init>介绍

暂无

代码示例

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @OnShow // <1>
  public void afterNavigation1() {
    /* ... */
  }
  @OnShow // <2>
  public void afterNavigation2(AfterNavigationEvent event) {
    /* ... */
  }
}
// end::route1[]

代码示例来源:origin: appreciated/vaadin-app-layout

@Route(value = "view2", layout = LeftHybridBehaviourView.class) // an empty view name will also be the default view
public class View2 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

代码示例来源:origin: appreciated/vaadin-app-layout

@Route(value = "view4", layout = LeftHybridBehaviourView.class) // an empty view name will also be the default view
public class View4 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

代码示例来源:origin: appreciated/vaadin-app-layout

@Route(value = "view3", layout = LeftBehaviourView.class) // an empty view name will also be the default view
public class View3 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter
  private Set<String> parameter; // <1>
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div implements HasUrlParameter<String> {
  @QueryParameter("myparam")
  private Integer parameter;
  @Override
  public void setParameter(BeforeEvent event, String parameter) {
    /* handle the path parameter value */
  }
}
// end::target[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div implements AfterNavigationObserver { // <1>
  @QueryParameter
  private Integer parameter;
  @Override
  public void afterNavigation(AfterNavigationEvent event) { // <2>
    /* handle the parameters value */
    Notification.show("Parameter value: " + this.parameter);
  }
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter
  private Integer parameter;
  @OnShow // <1>
  public void processParameters() {
    /* handle the parameters value */
    Notification.show("Parameter value: " + this.parameter);
  }
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter(required = true) // <1>
  private Integer parameter;
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter(defaultValue = "0") // <1>
  private Integer parameter;
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter("myparam") // <1>
  private Integer parameter;
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter
  private Integer parameter;
  public void setParameter(Integer parameter) { // <1>
    this.parameter = parameter;
  }
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter // <1>
  private Integer parameter;
}
// end::route1[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div implements HasUrlParameter<String> {
  @QueryParameter("myparam")
  private Integer parameter;
  @Override
  public void setParameter(BeforeEvent event, String parameter) {
    /* handle the path parameter value */
  }
}
// end::target[]

代码示例来源:origin: com.holon-platform.vaadin/documentation-vaadin-flow

@Route("some/path")
public class View extends Div {
  @QueryParameter
  private Optional<String> parameter; // <1>
}
// end::route1[]

代码示例来源:origin: vaadin/spring

@Route("foo")
@Component
@UIScope
public class FooNavigationTarget extends Div {

}

代码示例来源:origin: appreciated/vaadin-app-layout

@Caption("Dashboard")
@Icon(VaadinIcon.DASHBOARD)
@Route(value = "view4", layout = AnnotationView.class)
public class View4 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

代码示例来源:origin: appreciated/vaadin-app-layout

@Caption("Hammer")
@Icon(VaadinIcon.HAMMER)
@Route(value = "view8", layout = AnnotationView.class)
public class View8 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

代码示例来源:origin: appreciated/vaadin-app-layout

@Caption("Backspace")
@Icon(VaadinIcon.BACKSPACE)
@Route(value = "view2", layout = AnnotationView.class)
public class View2 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

代码示例来源:origin: appreciated/vaadin-app-layout

@Caption("Calc")
@Icon(VaadinIcon.CALC)
@Route(value = "view3", layout = AnnotationView.class)
public class View3 extends ExampleView {
  @Override
  protected String getViewName() {
    return getClass().getName();
  }
}

相关文章