Examples of HTMLPage


Examples of org.mojavemvc.tests.views.HTMLPage

    @Inject
    private HttpServletRequest request;

    @DefaultAction
    public View defaultAction() {
        return new HTMLPage();
    }
View Full Code Here

Examples of org.mojavemvc.tests.views.HTMLPage

        return new HTMLPage();
    }

    @Action("some-action")
    public View doSomething() {
        return new HTMLPage()
            .withH2Content("annot/some-action " + getParameter("var"));
    }
View Full Code Here

Examples of org.mojavemvc.tests.views.HTMLPage

        return new JSON(json);
    }

    @DefaultAction
    public View defaultAction() {
        return new HTMLPage();
    }
View Full Code Here

Examples of org.mojavemvc.tests.views.HTMLPage

public class BeforeController {

    @BeforeAction
    public View beforeAction() {

        return new HTMLPage()
            .withH1Content("before/index");
    }
View Full Code Here

Examples of org.mojavemvc.tests.views.HTMLPage

    }

    @Action("index")
    public View someAction() {

        return new HTMLPage();
    }
View Full Code Here

Examples of org.mojavemvc.tests.views.HTMLPage

    @Action("set-var")
    public View setVarAction(@Param("var") String var) {

        someStatefulVar = var;
        return new HTMLPage()
            .withH1Content("some-stateful/set-var");
    }
View Full Code Here

Examples of org.mojavemvc.tests.views.HTMLPage

    }

    @Action("get-var")
    public View getVarAction() {

        return new HTMLPage()
            .withH2Content(someStatefulVar != null ? someStatefulVar : "null");
    }
View Full Code Here

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

Examples of org.mojavemvc.tests.views.HTMLPage

    }

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

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

Examples of org.mojavemvc.tests.views.HTMLPage

        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
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.