TicketVO ticketVO = new TicketVO();
TicketForm ticketForm = (TicketForm)form;
SupportFacadeHome supportFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
SupportFacade remote = (SupportFacade)supportFacade.create();
remote.setDataSource(dataSource);
if (ticketForm.getSubject() != null) {
ticketVO.setTitle(ticketForm.getSubject());
}
if (ticketForm.getDetail() != null) {
ticketVO.setDetail(ticketForm.getDetail());
}
if (ticketForm.getPriority() != null) {
ticketVO.setPriorityId(Integer.parseInt(ticketForm.getPriority()));
}else{
ticketVO.setPriorityId(Integer.parseInt(request.getParameter("priority")));
}
if (ticketForm.getStatus() != null) {
ticketVO.setStatusId(Integer.parseInt(ticketForm.getStatus()));
}
if ((ticketForm.getManagerid() != null) && (!ticketForm.getManagerid().equals(""))) {
ticketVO.setManagerId(Integer.parseInt(ticketForm.getManagerid()));
}
if ((ticketForm.getAssignedtoid() != null) && (!ticketForm.getAssignedtoid().equals(""))) {
ticketVO.setAssignedToId(Integer.parseInt(ticketForm.getAssignedtoid()));
}
if ((ticketForm.getEntityid() != null) && (!ticketForm.getEntityid().equals(""))) {
ticketVO.setRefEntityId(Integer.parseInt(ticketForm.getEntityid()));
}
if ((ticketForm.getContactid() != null) && (!ticketForm.getContactid().equals(""))) {
ticketVO.setRefIndividualId(Integer.parseInt(ticketForm.getContactid()));
}
ticketVO.setCreatedBy(individualId);
ticketVO.setCustomField(getCustomFieldVO(request, response));
ticketVO.setId(Integer.parseInt(ticketForm.getId()));
remote.updateTicket(individualId, ticketVO);
String closeornew = (String)request.getParameter("closeornew");
String saveandclose = null;
String saveandnew = null;
if (closeornew.equals("close")) {