Examples of MailingListCommand


Examples of com.apress.progwt.server.web.domain.MailingListCommand

    @Override
    protected ModelAndView onSubmit(HttpServletRequest req,
            HttpServletResponse arg1, Object obj, BindException arg3)
            throws Exception {

        MailingListCommand comm = (MailingListCommand) obj;

        comm.setUserAgent(req.getHeader("User-Agent"));
        comm.setReferer(req.getHeader("Referer"));
        comm.setHost(req.getHeader("Host"));

        log.debug("email: " + comm.getEmail());
        log.debug("user-agent: " + comm.getUserAgent());

        invitationService.requestInvitation(comm);

        String successStr = "Thanks "
                + comm.getEmail()
                + " we'll let you know when you can sign up for an account.";

        Map<String, Object> model = new HashMap<String, Object>();
        model.put("message", successStr);
        model.put("command", new MailingListCommand());

        return new ModelAndView(getSuccessView(), model);

    }
View Full Code Here

Examples of com.apress.progwt.server.web.domain.MailingListCommand

        this.mailingListDAO = mailingListDAO;
    }

    public void testCreateEntry() {

        MailingListCommand comm = new MailingListCommand();
        comm.setEmail(A);
        comm.setHost(B);
        comm.setReferer(null);

        mailingListDAO.createEntry(comm);

        List<MailingListEntry> list = mailingListDAO.getMailingList();
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.