/**
   * Determine if the service type of the ticket is internal asset or not.
   *
   * @return true if the service type is internal asset, false otherwise.
   */
  protected boolean isInternalAsset(ServiceTicket ticket) {

    if (ServiceTicket.SERVICE_TYPE_CUSTOMER.equals(ticket.getServiceType())) {

      return false;

    } else {

      return true;
    }
  }
  /**
   * Display ticket data.
   *
   * @param ticket The ticket data model.
   */
  private void render(ServiceTicket ticket) {
    view.getTxtTicketNumber().setText(ticket.getTicketNumber());
    view.getTxtServiceType().setText(ticket.getServiceTypeDescription());
    view.getTxtServiceItem().setText(ticket.getServiceItem());
    view.getTxtDescription().setText(ticket.getServiceItemDescription());
    view.getTxtMainContact().setText(ticket.getMainContact());
    ((ListBox) view.getLstComplaint()).addItem(ticket.getComplaint());
    ((ListBox) view.getLstServiceProcedure()).addItem(ticket.getServiceProcedure());
    ((ListBox) view.getLstStatus()).addItem(ticket.getStatus());
    view.getTxtDateOpened().setText(DateUtil.formatDate(ticket.getDateOpened(), "MMM d, yyyy"));
    view.getTxtMainContactNumber().setText(ticket.getMainContactNumber());
    view.getTxtSiteContact().setText(ticket.getSiteContact());
    view.getTxtSiteContactNumber().setText(ticket.getSiteContactNumber());
    view.getTxtSecondNumber().setText(ticket.getSecondNumber());
    view.getTxtContactEmail().setText(ticket.getContactEmail());
    ((CheckBox) view.getChkRepeatIssue()).setValue(ticket.isRepeatIssue());
    view.getTxtPreviousTicket().setText(ticket.getPreviousTicket());
    ((ListBox) view.getLstPriorityCode()).addItem(ticket.getPriorityCode());
    view.getTxtSubject().setText(ticket.getSubject());
    ((CheckBox) view.getChkConfirmationNeeded()).setValue(ticket.isConfirmationRequired());
    ((CheckBox) view.getChkConfirmed()).setValue(ticket.isConfirmed());
    view.getTxtScheduledDate().setText(DateUtil.formatDate(ticket.getScheduledDate()));
    view.getTxtStartTime().setText(DateUtil.formatTime(ticket.getStartTime()));
    view.getTxtEffort().setText(String.valueOf(ticket.getEffort()));
    ((ListBox) view.getLstAssignedTo()).addItem(ticket.getAssignedTo());
    view.getTxtRespondByDate()
        .setText(DateUtil.formatDate(ticket.getRespondByDate(), "MMM d, yyyy"));
    view.getTxtRespondByTime().setText(DateUtil.formatTime(ticket.getRespondByTime()));
    view.getTxtEstimatedCost().setText(String.valueOf(ticket.getEstimatedCost()));
    view.getTxtCustomerPO().setText(ticket.getCustomerPO());

    registerListeners();
  }