Package org.jboss.errai.ui.nav.client.local

Examples of org.jboss.errai.ui.nav.client.local.Page.path()


        throw new GenerationException(
                "Class " + pageClass.getFullyQualifiedName() + " is annotated with @Page, so it must be a subtype " +
                "of Widget.");
      }
      Page annotation = pageClass.getAnnotation(Page.class);
      List<String> template = parsePageUriTemplate(pageClass, annotation.path());
      String pageName = template.get(0);

      MetaClass prevPageWithThisName = pageNames.put(pageName, pageClass);
      if (prevPageWithThisName != null) {
        throw new GenerationException(
View Full Code Here


                  " are both named [" + pageName + "]");
        }
        Statement pageImplStmt = generateNewInstanceOfPageImpl(pageClass, pageName);
        if (annotatedPageRoles.contains(DefaultPage.class)) {
          // need to assign the page impl to a variable and add it to the map twice
          URLPattern pattern = URLPatternMatcher.generatePattern(annotation.path());
          if(pattern.getParamList().size() > 0) {
            throw new GenerationException("Default Page must not contain any path parameters.");
          }
          ctor.append(Stmt.declareFinalVariable("defaultPage", PageNode.class, pageImplStmt));
          pageImplStmt = Variable.get("defaultPage");
View Full Code Here

    return pageImplBuilder.finish();
  }

  private String getPageURL(MetaClass pageClass, String pageName) {
    Page pageAnnotation = pageClass.getAnnotation(Page.class);
    String path = pageAnnotation.path();
   
    if (path.equals("")) {
      return pageName;
    }
   
View Full Code Here

    return classBuilder.toJavaString();
  }

  private String getPageName(MetaClass pageClass) {
    final Page annotation = pageClass.getAnnotation(Page.class);
    return annotation.path().equals("") ? pageClass.getName() : annotation.path();
  }

  private void validateDefaultPagePresent(Collection<MetaClass> pages, Multimap<Class<?>, MetaClass> pageRoles) {
    Collection<MetaClass> defaultPages = pageRoles.get(DefaultPage.class);
    if (!pages.isEmpty() && defaultPages.isEmpty()) {
View Full Code Here

    return classBuilder.toJavaString();
  }

  private String getPageName(MetaClass pageClass) {
    final Page annotation = pageClass.getAnnotation(Page.class);
    return annotation.path().equals("") ? pageClass.getName() : annotation.path();
  }

  private void validateDefaultPagePresent(Collection<MetaClass> pages, Multimap<Class<?>, MetaClass> pageRoles) {
    Collection<MetaClass> defaultPages = pageRoles.get(DefaultPage.class);
    if (!pages.isEmpty() && defaultPages.isEmpty()) {
View Full Code Here

    return out;
  }

  private String getPageName(MetaClass pageClass) {
    final Page annotation = pageClass.getAnnotation(Page.class);
    return annotation.path().equals("") ? pageClass.getName() : annotation.path();
  }

  private void validateDefaultPagePresent(Collection<MetaClass> pages, Multimap<Class<?>, MetaClass> pageRoles) {
    Collection<MetaClass> defaultPages = pageRoles.get(DefaultPage.class);
    if (!pages.isEmpty() && defaultPages.isEmpty()) {
View Full Code Here

    return out;
  }

  private String getPageName(MetaClass pageClass) {
    final Page annotation = pageClass.getAnnotation(Page.class);
    return annotation.path().equals("") ? pageClass.getName() : annotation.path();
  }

  private void validateDefaultPagePresent(Collection<MetaClass> pages, Multimap<Class<?>, MetaClass> pageRoles) {
    Collection<MetaClass> defaultPages = pageRoles.get(DefaultPage.class);
    if (!pages.isEmpty() && defaultPages.isEmpty()) {
View Full Code Here

        throw new GenerationException(
                "Class " + pageClass.getFullyQualifiedName() + " is annotated with @Page, so it must be a subtype " +
                "of Widget.");
      }
      Page annotation = pageClass.getAnnotation(Page.class);
      String pageName = annotation.path().equals("") ? pageClass.getName() : annotation.path();

      MetaClass prevPageWithThisName = pageNames.put(pageName, pageClass);
      if (prevPageWithThisName != null) {
        throw new GenerationException(
                "Page names must be unique, but " + prevPageWithThisName + " and " + pageClass +
View Full Code Here

        throw new GenerationException(
                "Class " + pageClass.getFullyQualifiedName() + " is annotated with @Page, so it must be a subtype " +
                "of Widget.");
      }
      Page annotation = pageClass.getAnnotation(Page.class);
      String pageName = annotation.path().equals("") ? pageClass.getName() : annotation.path();

      MetaClass prevPageWithThisName = pageNames.put(pageName, pageClass);
      if (prevPageWithThisName != null) {
        throw new GenerationException(
                "Page names must be unique, but " + prevPageWithThisName + " and " + pageClass +
View Full Code Here

    return false;
  }

  private String getPageName(MetaClass pageClass) {
    final Page annotation = pageClass.getAnnotation(Page.class);
    return annotation.path().equals("") ? pageClass.getName() : annotation.path();
  }

  private void validateDefaultPagePresent(Collection<MetaClass> pages, Multimap<Class<?>, MetaClass> pageRoles) {
    Collection<MetaClass> defaultPages = pageRoles.get(DefaultPage.class);
    if (!pages.isEmpty() && defaultPages.isEmpty()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.