Examples of HolidayBookingForm


Examples of org.strecks.holidaybooking.web.struts.form.HolidayBookingForm

      HttpServletResponse response) throws Exception
  {

    if (request.getAttribute(Globals.CANCEL_KEY) == null)
    {
      HolidayBookingForm holidayBookingForm = (HolidayBookingForm) form;

      HolidayBookingService holidayBookingService = (HolidayBookingService) getWebApplicationContext().getBean(
          "holidayBookingService");

      HolidayBooking holidayBooking = new HolidayBooking();
      holidayBookingForm.writeTo(holidayBooking);

      holidayBookingService.addHolidayBooking(holidayBooking);

      request.setAttribute("displayMessage", "Successfully added entry: " + holidayBooking.getTitle());
    }
View Full Code Here

Examples of org.strecks.holidaybooking.web.struts.form.HolidayBookingForm

    if (errors != null && !errors.isEmpty())
    {
      isInputError = true;
    }

    HolidayBookingForm holidayForm = (HolidayBookingForm) form;
    holidayForm.setEditMode(true);

    if (!isInputError)
    {
      long id = Long.parseLong(request.getParameter("holidayBookingId"));
      HolidayBooking holidayBooking = holidayBookingService.getHolidayBooking(id);
      holidayForm.readFrom(holidayBooking);
      holidayForm.setEditMode(true);
    }
   
    return mapping.findForward("success");
  }
View Full Code Here

Examples of org.strecks.holidaybooking.web.struts.form.HolidayBookingForm

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception
  {

    HolidayBookingForm holidayBookingForm = (HolidayBookingForm) form;

    if (request.getAttribute(Globals.CANCEL_KEY) == null)
    {
      HolidayBookingService holidayBookingService = (HolidayBookingService) getWebApplicationContext().getBean(
          "holidayBookingService");

      HolidayBooking holidayBooking = new HolidayBooking();
      holidayBookingForm.writeTo(holidayBooking);

      holidayBookingService.updateHolidayBooking(holidayBooking);

      request.setAttribute("displayMessage", "Successfully updated entry: " + holidayBooking.getTitle());
    }
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.