Package org.mojavemvc.tests.views

Examples of org.mojavemvc.tests.views.HTMLPage$Paragraph


   
    // create some data
    // use a.b.m2.Book which has 1:N relations (collection) to other beans
    Book book = new Book("History of Britain", "John O'Farrel", ImmutableList.copyOf(new Section[] {
      new Section("Section1", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(1, "Bla bla bla"),
      })),
      new Section("Section2", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1066, "Bla bla bla"),
      })),
      new Section("Section3", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(2, "Bla bla bla"),
          new Paragraph(3, "Bla bla bla"),
      })),
    }));
   
    // instantiate cloner
    BookCloner987 bookCloner987 = new BookCloner987();
View Full Code Here


  public static void main(String[] args) {
    // create some data
    // use a.b.m2.Book which has 1:N relations (collection) to other beans
    Book book = new Book("History of Britain", "John O'Farrel", ImmutableList.copyOf(new Section[] {
      new Section("Section1", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(1, "Bla bla bla"),
      })),
      new Section("Section2", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1066, "Bla bla bla"),
      })),
      new Section("Section3", "no description", ImmutableSet.copyOf(new Paragraph[] {
          new Paragraph(1, "Bla bla bla"),
          new Paragraph(2, "Bla bla bla"),
          new Paragraph(3, "Bla bla bla"),
      })),
    }));
   
    // instantiate cloner
    BookCloner988 bookCloner = new BookCloner988();
View Full Code Here

    }

    @Action
    public View doSomething() {

        return new HTMLPage();
    }
View Full Code Here

    }

    @Action("param-annotation-dates")
    public View paramAnnotationTest11(@Param("p1") Date[] p1) {

        return new HTMLPage()
            .withH2Content("index/param-annotation-dates " +
                    p1[0].toString() + ", " + p1[1].toString() +
                    ", " + p1[2].toString() + ", " + p1[3].toString());
    }
View Full Code Here

    }

    @Action("param-annotation-bools")
    public View paramAnnotationTest12(@Param("p1") boolean[] p1) {

        return new HTMLPage()
            .withH2Content("index/param-annotation-bools " +
                    p1[0] + ", " + p1[1] + ", " + p1[2] + ", " + p1[3]);
    }
View Full Code Here

    @Action("injected")
    public View injectedAction() {

        String var = injectedController.process("index");
        return new HTMLPage()
            .withH2Content("index/injected " + var);
    }
View Full Code Here

public class AfterWithContextController {

    @Action("index")
    public View someAction(@Param("p1") String name) {

        return new HTMLPage();
    }
View Full Code Here

        String controller = ctx.getController();
        if (!"afterctx".equals(controller)) {
            throw new RuntimeException("controller incorrect");
        }

        return new HTMLPage()
            .withH2Content(String.valueOf(parameters[0]));
    }
View Full Code Here

    }

    @Action
    public View doSomething() {

        return new HTMLPage()
            .withH2Content("streaming2");
    }
View Full Code Here

    @Action("test")
    public View testAction(@Param("var") String var) {

        String processed = process(var);
        return new HTMLPage()
            .withH1Content("injectable/test")
            .withH2Content(processed);
    }
View Full Code Here

TOP

Related Classes of org.mojavemvc.tests.views.HTMLPage$Paragraph

Copyright © 2018 www.massapicom. 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.