Search in sources :

Example 6 with Visitor

use of site.model.Visitor in project jprime by bgjug.

the class AdminRegistrantController method getAddVisitorToRegistrantForm.

@RequestMapping(value = "/{itemId}/addVisitor", method = RequestMethod.GET)
public String getAddVisitorToRegistrantForm(@PathVariable("itemId") Long itemId, Model model) {
    Visitor visitor = new Visitor();
    visitor.setRegistrant(adminFacade.findOneRegistrant(itemId));
    model.addAttribute("visitor", visitor);
    model.addAttribute("statuses", VisitorStatus.values());
    return AdminVisitorController.VISITOR_EDIT_JSP;
}
Also used : Visitor(site.model.Visitor) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with Visitor

use of site.model.Visitor in project jprime by bgjug.

the class AdminVisitorController method getEditVisitorForm.

@RequestMapping(value = "/edit/{itemId}", method = RequestMethod.GET)
public String getEditVisitorForm(@PathVariable("itemId") Long itemId, Model model) {
    Visitor visitor = adminFacade.findOneVisitor(itemId);
    model.addAttribute("statuses", VisitorStatus.values());
    model.addAttribute("visitor", visitor);
    return VISITOR_EDIT_JSP;
}
Also used : Visitor(site.model.Visitor) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 8 with Visitor

use of site.model.Visitor in project jprime by bgjug.

the class TicketsController method handlePersonalRegistrant.

/**
 * if registrant info is not filled, copy it from the first visitor
 */
private void handlePersonalRegistrant(Registrant registrant) {
    Visitor firstVisitor = registrant.getVisitors().get(0);
    registrant.setName(firstVisitor.getName());
    registrant.setEmail(firstVisitor.getEmail());
}
Also used : Visitor(site.model.Visitor)

Aggregations

Visitor (site.model.Visitor)8 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 Registrant (site.model.Registrant)2 BufferedWriter (java.io.BufferedWriter)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 MessagingException (javax.mail.MessagingException)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 Transactional (javax.transaction.Transactional)1 Valid (javax.validation.Valid)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 Qualifier (org.springframework.beans.factory.annotation.Qualifier)1 HttpHeaders (org.springframework.http.HttpHeaders)1 Controller (org.springframework.stereotype.Controller)1