Package org.mojavemvc.tests.views

Examples of org.mojavemvc.tests.views.HTMLPage


        Long ts = (Long)request.getAttribute("ts");
        if (ts == null) {
            ts = System.currentTimeMillis();
            request.setAttribute("ts", ts);
        }
        return new HTMLPage()
            .withH2Content(String.valueOf(ts));
    }
View Full Code Here


    }

    @Action("get-inj")
    public View getInjAction() {

        return new HTMLPage()
            .withH2Content(Integer.toHexString(System.identityHashCode(someService)));
    }
View Full Code Here

        if (!"beforectx2".equals(controller)) {
            throw new RuntimeException("controller incorrect");
        }

        SomeForm form = (SomeForm) parameters[0];
        return new HTMLPage()
            .withH2Content(form.getUserName() + " " + form.getPassword());
    }
View Full Code Here

    }

    @Action("index")
    public View someAction(@Model SomeForm form) {

        return new HTMLPage();
    }
View Full Code Here

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

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

    }

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

        return new HTMLPage();
    }
View Full Code Here

    }
   
    @Action("expects/plaintext/string")
    @Expects("text/plain")
    public View expectPlainTextWithString(@Entity String name) {
        return new HTMLPage()
            .withH2Content(name);
    }
View Full Code Here

    }
   
    @Action("expects/plaintext/pojo")
    @Expects("text/plain")
    public View expectPlainTextWithPojo(@Entity SimplePojo pojo) {
        return new HTMLPage()
            .withH2Content(pojo.getVal());
    }
View Full Code Here

    }
   
    @Action("expects/json")
    @Expects("application/json")
    public View expectJSON(@Entity SimplePojo pojo) {
        return new HTMLPage()
            .withH2Content(pojo.getVal());
    }
View Full Code Here

    }
   
    @Action("expects/xml")
    @Expects("application/xml")
    public View expectXML(@Entity SimplePojo pojo) {
        return new HTMLPage()
            .withH2Content(pojo.getVal());
    }
View Full Code Here

TOP

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

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.